r67279 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67278‎ | r67279 | r67280 >
Date:13:22, 3 June 2010
Author:yaron
Status:deferred
Tags:
Comment:
Added fix to isNumeric() when getValueIndex() returns an invalid number
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php
@@ -680,6 +680,7 @@
681681 public function isNumeric() {
682682 $sig = $this->getSignature();
683683 $valueIndex = $this->getValueIndex();
 684+ if ( $valueIndex < 0 ) { return false; }
684685
685686 return $sig { $valueIndex } == 'n' || $sig { $valueIndex } == 'f';
686687 }
@@ -791,4 +792,4 @@
792793 return ''; // empty unit
793794 }
794795
795 -}
\ No newline at end of file
 796+}

Status & tagging log