From 95e6efc4d490911b4206503d9d26f832788cf97b Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 7 Nov 2014 10:36:29 -0800 Subject: [PATCH] Improved/additional logging for $wgTitle abuses Change-Id: I6599aa8abe30c1888ab5df023a0d4bf346315400 --- includes/cache/MessageCache.php | 1 + includes/context/RequestContext.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 99dafa60cc..7cd1377ee3 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -1059,6 +1059,7 @@ class MessageCache { wfProfileIn( __METHOD__ ); if ( !$title || !$title instanceof Title ) { global $wgTitle; + wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetAllCallers() . ' with no title set.' ); $title = $wgTitle; } // Sometimes $wgTitle isn't set either... diff --git a/includes/context/RequestContext.php b/includes/context/RequestContext.php index 059f18c133..d620be9c87 100644 --- a/includes/context/RequestContext.php +++ b/includes/context/RequestContext.php @@ -140,7 +140,7 @@ class RequestContext implements IContextSource { if ( $this->title === null ) { global $wgTitle; # fallback to $wg till we can improve this $this->title = $wgTitle; - wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetCaller() . ' with no title set.' ); + wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetAllCallers() . ' with no title set.' ); } return $this->title; -- 2.20.1