jenkins-bot has submitted this change and it was merged.

Change subject: (Bug 48528) TEMPORARY: Log lots of info to catch a bug
......................................................................


(Bug 48528) TEMPORARY: Log lots of info to catch a bug

Change-Id: Ie5537a4fc0c79ce49baf386e4dcb61d2b7b25a3b
---
M includes/PageRenderingHooks.php
1 file changed, 21 insertions(+), 1 deletion(-)

Approvals:
  Tim Starling: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/PageRenderingHooks.php b/includes/PageRenderingHooks.php
index c2aef24..fd24e78 100644
--- a/includes/PageRenderingHooks.php
+++ b/includes/PageRenderingHooks.php
@@ -21,7 +21,7 @@
 class PageRenderingHooks {
        private static $formatMobileUrl = '//%s.m.wikipedia.org/wiki/Main_Page';
        private static $formatZeroUrl = 
'//%s.zero.wikipedia.org/wiki/Main_Page';
-
+       private static $carrierId;
 
        /**
         * GetMobileUrl hook handler
@@ -368,6 +368,25 @@
                        global $wgLang;
                        $lang = $wgLang;
                }
+
+
+
+               // BUG HUNTING!
+               if ( !$config['name'] || !$config['banner'] ) {
+                       global $wgRequest;
+                       $dbg = 'Zero bug, ID="' . self::$carrierId . '"- 
missing';
+                       if ( !$config['name'] ) $dbg .= ' name';
+                       if ( !$config['banner'] ) $dbg .= ' banner';
+                       $dbg .= ': ';
+                       $dbg .= print_r( $config, true );
+                       $dbg .= "\nIP:" . $wgRequest->getIP() .  ", URL: " . 
$_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
+                       $dbg .= "\nHeaders: " . print_r( 
$wgRequest->getAllHeaders(), true );
+                       wfDebugLog( 'temp-debug', $dbg );
+               }
+
+
+
+
                $fallbacks = null;
                $name = self::pickLocalizedString( $config['name'], $lang, 
$fallbacks );
                if ( $name === false ) {
@@ -440,6 +459,7 @@
                if ( $id === '(null)' || !$id ) {
                        $id = null;
                }
+               self::$carrierId = $id;
                if ( $id !== null ) {
                        $store = new CarrierConfigStore( $id );
                        $text = $store->get();

-- 
To view, visit https://gerrit.wikimedia.org/r/64020
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5537a4fc0c79ce49baf386e4dcb61d2b7b25a3b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ZeroRatedMobileAccess
Gerrit-Branch: master
Gerrit-Owner: Yurik <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to