From 08fbff373b3758daca94c3517008c50cd0500915 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 4 May 2007 21:04:50 +0000 Subject: [PATCH] Avoid cyclic stub problems when authorization hooks do funny things with the user and the database at load time --- includes/Database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) . '...'; -- 2.20.1