Default true :)
[lhc/web/wiklou.git] / includes / Setup.php
index d450dfd..98b12c9 100644 (file)
@@ -305,7 +305,12 @@ wfProfileIn( $fname.'-extensions' );
 # of the extension file. This allows the extension to perform
 # any necessary initialisation in the fully initialised environment
 foreach ( $wgExtensionFunctions as $func ) {
-       $profName = $fname.'-extensions-'.strval( $func );
+       # Allow closures in PHP 5.3+
+       if ( is_object( $func ) && $func instanceof Closure )
+               $profName = $fname.'-extensions-closure';
+       else
+               $profName = $fname.'-extensions-'.strval( $func );
+
        wfProfileIn( $profName );
        call_user_func( $func );
        wfProfileOut( $profName );