From 27c4fa3ae0eaca939654c25fd751a150503239b7 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Fri, 25 Mar 2011 18:24:58 +0000 Subject: [PATCH] (bug 27171) Incorrect error message during extension installation. lol @ PHP's scope rules --- includes/installer/Installer.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index ef3f63ca20..e9f970b3c5 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -1196,7 +1196,7 @@ abstract class Installer { * but we're not opening that can of worms * @see https://bugzilla.wikimedia.org/show_bug.cgi?id=26857 */ - global $wgHooks, $wgAutoloadClasses; + global $wgAutoloadClasses; require( "$IP/includes/DefaultSettings.php" ); foreach( $exts as $e ) { @@ -1208,8 +1208,7 @@ abstract class Installer { // Unset everyone else's hooks. Lord knows what someone might be doing // in ParserFirstCallInit (see bug 27171) - unset( $wgHooks ); - $wgHooks = array( 'LoadExtensionSchemaUpdates' => $hooksWeWant ); + $GLOBALS['wgHooks'] = array( 'LoadExtensionSchemaUpdates' => $hooksWeWant ); return Status::newGood(); } -- 2.20.1