--- wikilib.php.orig    2008-07-10 05:46:34.000000000 -0700
+++ wikilib.php 2008-11-25 13:49:01.000000000 -0800
@@ -668,7 +668,6 @@

     function list_plugins($with_help = false) {
        $files = array();
-
        if (is_dir(PLUGINS_DIR)) {
            if ($dh = opendir(PLUGINS_DIR)) {
                while (($file = readdir($dh)) !== false) {
@@ -705,21 +704,24 @@
     function get_plugin_description($file) {
        global $tikilib;
         $data = '';
-        $fp = fopen(PLUGINS_DIR . '/' . $file, 'r');
-        while(!feof($fp)) {
-              $data .= fread($fp,4096);
-        }
-        fclose($fp);
-        $func_name = str_replace('.php', '', $file). '_help';
-       if (!preg_match('#.*?function\s+' . $func_name .
-                       '[\s|^]*\([\s|^]*\)[\s|^]*(.+)#msi', $data, $prematch)
-           || !preg_match('#\{((?:(?R)|[^{}]+)+)}#ms',
-                   $prematch[1], $matches)) {
-          return '';
-       }
-        $fun = create_function('', $matches[1]);
-        $ret = $tikilib->parse_data($fun());
-        return $ret;
+        if ($fp = fopen(PLUGINS_DIR . '/' . $file, 'r')){
+               while(!feof($fp)) {
+                     $data .= fread($fp,4096);
+               }
+               fclose($fp);
+               $func_name = str_replace('.php', '', $file). '_help';
+               if (!preg_match('#.*?function\s+' . $func_name .
+                               '[\s|^]*\([\s|^]*\)[\s|^]*(.+)#msi', $data, $prematch)
+                   || !preg_match('#\{((?:(?R)|[^{}]+)+)}#ms',
+                           $prematch[1], $matches)) {
+                  return '';
+               }
+               $fun = create_function('', $matches[1]);
+               $ret = $tikilib->parse_data($fun());
+               return $ret;
+               } else {
+                       return '';
+               }
     }

        // get all modified pages for a user (if actionlog is not clean
