From 67b0cf6906e18fbc01934a2c5ae87ef49e78f640 Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Sat, 15 Jan 2005 07:28:33 +0000 Subject: [PATCH] Don't load user object from DB when in command line mode. DB might not yet exist --- includes/Setup.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/Setup.php b/includes/Setup.php index 0beca545f0..33a4ea7830 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -231,6 +231,8 @@ if( $wgCommandLineMode ) { # Used for some maintenance scripts; user session cookies can screw things up # when the database is in an in-between state. $wgUser = new User(); + # Prevent loading User settings from the DB. + $wgUser->setLoaded( true ); } else { $wgUser = User::loadFromSession(); } -- 2.20.1