diff --git a/inc/io.php b/inc/io.php
index 4c6eb97dfe6e157caccb1063de689c66677832e8..b4da7d635ce4f0a1592d06827d0be6f6045cc665 100644
--- a/inc/io.php
+++ b/inc/io.php
@@ -18,8 +18,8 @@ if(!defined('DOKU_INC')) die('meh.');
  *
  * @todo use safemode hack
  * @param string $id      - a pageid, the namespace of that id will be tried to deleted
- * @param string $basadir - the config name of the type to delete (datadir or mediadir usally)
- * @returns bool - true if at least one namespace was deleted
+ * @param string $basedir - the config name of the type to delete (datadir or mediadir usally)
+ * @return bool - true if at least one namespace was deleted
  * @author  Andreas Gohr <andi@splitbrain.org>
  * @author Ben Coburn <btcoburn@silicodon.net>
  */
@@ -113,6 +113,7 @@ function io_readFile($file,$clean=true){
 
 function bzfile($file){
     $bz = bzopen($file,"r");
+    $str = '';
     while (!feof($bz)){
         //8192 seems to be the maximum buffersize?
         $str = $str . bzread($bz,8192);
@@ -477,8 +478,8 @@ function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=20
     $data = $http->get($url);
     if(!$data) return false;
 
+    $name = '';
     if ($useAttachment) {
-        $name = '';
         if (isset($http->resp_headers['content-disposition'])) {
             $content_disposition = $http->resp_headers['content-disposition'];
             $match=array();
@@ -578,8 +579,8 @@ function io_exec($cmd, $input, &$output){
  * @param  string $file    The file to search
  * @param  string $pattern PCRE pattern
  * @param  int    $max     How many lines to return (0 for all)
- * @param  bool   $baxkref When true returns array with backreferences instead of lines
- * @return matching lines or backref, false on error
+ * @param  bool   $backref When true returns array with backreferences instead of lines
+ * @return array matching lines or backref, false on error
  */
 function io_grep($file,$pattern,$max=0,$backref=false){
     $fh = @fopen($file,'r');
diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php
index e149770c0e8507b99d428cd4db59e43d0077be7d..1ccede92378a7d108c241d30f86437313ddba47a 100644
--- a/lib/exe/indexer.php
+++ b/lib/exe/indexer.php
@@ -175,6 +175,7 @@ function sendDigest() {
     }
     $subscriptions = subscription_find($ID, array('style' => '(digest|list)',
                                                   'escaped' => true));
+    /** @var auth_basic $auth */
     global $auth;
     global $lang;
     global $conf;