r101392 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101391‎ | r101392 | r101393 >
Date:19:45, 31 October 2011
Author:preilly
Status:ok
Tags:
Comment:
fix use of weak comparison
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -356,8 +356,8 @@
357357 $hostParts = explode( '.', $parsedUrl['host'] );
358358 $parsedUrl['host'] = $hostParts[0] . $wgMobileDomain . $hostParts[1] . '.' . $hostParts[2];
359359 }
360 - $fragmentDelimiter = ( isset( $parsedUrl['fragment'] ) && $parsedUrl['fragment'] != null ) ? '#' : '';
361 - $queryDelimiter = ( isset( $parsedUrl['query'] ) && $parsedUrl['query'] != null ) ? '?' : '';
 360+ $fragmentDelimiter = ( isset( $parsedUrl['fragment'] ) && $parsedUrl['fragment'] !== null ) ? '#' : '';
 361+ $queryDelimiter = ( isset( $parsedUrl['query'] ) && $parsedUrl['query'] !== null ) ? '?' : '';
362362 $languageUrl = $parsedUrl['scheme'] . $parsedUrl['delimiter'] . $parsedUrl['host'] . $parsedUrl['path'] . $queryDelimiter . $parsedUrl['query'] . $fragmentDelimiter . $parsedUrl['fragment'];
363363
364364 $languageUrls[] = array(

Follow-up revisions

RevisionCommit summaryAuthorDate
r101393mft r101392preilly19:45, 31 October 2011

Status & tagging log