Fixed broken installer due to bad $plugins object
authorDan
Thu, 21 Feb 2008 17:19:49 -0500
changeset 438 c9522c961e10
parent 437 b66f029ae12d
child 439 d9dd2b2134c4
Fixed broken installer due to bad $plugins object
includes/wikiformat.php
--- a/includes/wikiformat.php	Thu Feb 21 17:18:25 2008 -0500
+++ b/includes/wikiformat.php	Thu Feb 21 17:19:49 2008 -0500
@@ -109,10 +109,15 @@
         }
         
         global $plugins;
-        $code = $plugins->setHook('text_wiki_construct');
-        foreach ( $code as $cmd )
+        // This code can be run from the installer, so in some cases $plugins
+        // isn't initted. (Bug in 1.1.2, fixed for 1.1.3)
+        if ( is_object($plugins) )
         {
-            eval($cmd);
+          $code = $plugins->setHook('text_wiki_construct');
+          foreach ( $code as $cmd )
+          {
+              eval($cmd);
+          }
         }
 
         $this->addPath(