From: Brion Vibber Date: Fri, 4 May 2007 21:04:50 +0000 (+0000) Subject: Avoid cyclic stub problems when authorization hooks do funny things with the user... X-Git-Tag: 1.31.0-rc.0~53081 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=08fbff373b3758daca94c3517008c50cd0500915;p=lhc%2Fweb%2Fwiklou.git Avoid cyclic stub problems when authorization hooks do funny things with the user and the database at load time --- diff --git a/includes/Database.php b/includes/Database.php index ef18a6de2a..3fd6ad169c 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -709,7 +709,7 @@ class Database { # Add a comment for easy SHOW PROCESSLIST interpretation #if ( $fname ) { global $wgUser; - if ( is_object( $wgUser ) ) { + if ( is_object( $wgUser ) && !($wgUser instanceof StubObject) ) { $userName = $wgUser->getName(); if ( strlen( $userName ) > 15 ) { $userName = substr( $userName, 0, 15 ) . '...';