From e4a21087cc95c66ec8a3671266692047b9c632f1 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Sat, 3 Jul 2010 06:06:02 +0000 Subject: [PATCH] New installer: fixed fatal exception due to attempted DB access from User::loadOptions() --- includes/installer/Installer.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 03804423f1..6af820b9db 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -224,6 +224,10 @@ abstract class Installer { $wgExtensionMessagesFiles['MediawikiInstaller'] = './includes/installer/Installer.i18n.php'; + global $wgUser; + $wgUser = User::newFromId( 0 ); + // Having a user with id = 0 safeguards us from DB access via User::loadOptions() + // Set our custom hook global $wgHooks; $wgHooks['ParserFirstCallInit'][] = array( $this, 'registerDocLink' ); -- 2.20.1