From: Rob Church Date: Sat, 20 Jan 2007 19:24:37 +0000 (+0000) Subject: Check for interface existence in wfLoadAllExtensions() too, otherwise if an extension... X-Git-Tag: 1.31.0-rc.0~54272 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=ce733745aab179cd80c47c89ff08a9655b968787;p=lhc%2Fweb%2Fwiklou.git Check for interface existence in wfLoadAllExtensions() too, otherwise if an extension comes with an interface [e.g. BookInformation], the require() can cause it to be double-initialised (the implementing classes will have been loaded, which will have caused PHP to autoload the interface definition) leading to a fatal error --- diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index ff89b6c678..55a90d347d 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -316,7 +316,7 @@ function wfLoadAllExtensions() { require_once( 'SpecialPage.php' ); foreach( $wgAutoloadClasses as $class => $file ) { - if ( ! class_exists( $class ) ) { + if( !( class_exists( $class ) || interface_exists( $class ) ) ) { require( $file ); } }