r94195 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94194‎ | r94195 | r94196 >
Date:20:42, 10 August 2011
Author:preilly
Status:ok
Tags:
Comment:
fix Undefined index: HTTP_X_DEVICE error
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -49,7 +49,7 @@
5050 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( &$wgExtMobileFrontend, 'addMobileFooter' );
5151
5252 class ExtMobileFrontend {
53 - const VERSION = '0.5.14';
 53+ const VERSION = '0.5.15';
5454
5555 /**
5656 * @var DOMDocument
@@ -320,7 +320,7 @@
321321
322322 // Determine
323323
324 - $xDevice = $_SERVER['HTTP_X_DEVICE'];
 324+ $xDevice = isset( $_SERVER['HTTP_X_DEVICE'] ) ? $_SERVER['HTTP_X_DEVICE'] : '';
325325
326326 if (self::$useFormat === 'mobile' ||
327327 self::$useFormat === 'mobile-wap' ||

Status & tagging log