r18892 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18891‎ | r18892 | r18893 >
Date:23:20, 6 January 2007
Author:rainman
Status:old
Tags:
Comment:
String length check to avoid warnings for empty strings...
Modified paths:
  • /trunk/phase3/languages/LanguageConverter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/LanguageConverter.php
@@ -297,7 +297,7 @@
298298 $flags = array();
299299
300300 // process flag only if the flag is valid
301 - if(! ( in_array($marked[0],$this->mFlags) && $marked[1]=='|' ) )
 301+ if(strlen($marked) < 2 || !(in_array($marked[0],$this->mFlags) && $marked[1]=='|' ) )
302302 return array($marked,array());
303303
304304 $tt = explode($this->mMarkup['flagsep'], $marked, 2);