r102410 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102409‎ | r102410 | r102411 >
Date:16:16, 8 November 2011
Author:yaron
Status:deferred
Tags:
Comment:
Fix for r102353 - replaced "=== ''" with is_null(), to get it working again
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php
@@ -54,14 +54,14 @@
5555 // get the GET parameters
5656 $this->articletext = $wgRequest->getVal( 'article' );
5757 // no GET parameters? Then try the URL
58 - if ( $this->articletext === '' ) {
 58+ if ( is_null( $this->articletext ) ) {
5959 $params = SMWInfolink::decodeParameters( $query, false );
6060 reset( $params );
6161 $this->articletext = current( $params );
6262 }
6363 $this->subject = SMWDataValueFactory::newTypeIDValue( '_wpg', $this->articletext );
6464 $offsettext = $wgRequest->getVal( 'offset' );
65 - $this->offset = ( $offsettext === '' ) ? 0:intval( $offsettext );
 65+ $this->offset = ( is_null( $offsettext ) ) ? 0 : intval( $offsettext );
6666 $dir = $wgRequest->getVal( 'dir' );
6767 if ( $smwgBrowseShowAll ) {
6868 $this->showoutgoing = true;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102353properly check for empty stringsjeroendedauw00:44, 8 November 2011