From: Max Semenik Date: Sat, 3 Jul 2010 06:06:02 +0000 (+0000) Subject: New installer: fixed fatal exception due to attempted DB access from User::loadOptions() X-Git-Tag: 1.31.0-rc.0~36290 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=e4a21087cc95c66ec8a3671266692047b9c632f1;p=lhc%2Fweb%2Fwiklou.git New installer: fixed fatal exception due to attempted DB access from User::loadOptions() --- 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' );