Improved/additional logging for $wgTitle abuses
authorChad Horohoe <chadh@wikimedia.org>
Fri, 7 Nov 2014 18:36:29 +0000 (10:36 -0800)
committerChad Horohoe <chadh@wikimedia.org>
Mon, 10 Nov 2014 19:04:43 +0000 (11:04 -0800)
Change-Id: I6599aa8abe30c1888ab5df023a0d4bf346315400

includes/cache/MessageCache.php
includes/context/RequestContext.php

index 99dafa6..7cd1377 100644 (file)
@@ -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...
index 059f18c..d620be9 100644 (file)
@@ -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;