From ce733745aab179cd80c47c89ff08a9655b968787 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sat, 20 Jan 2007 19:24:37 +0000 Subject: [PATCH] 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 --- includes/AutoLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); } } -- 2.20.1