From e9b2da610b254f94f147cf91b4efd07017839621 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 30 Mar 2011 12:04:54 +0000 Subject: [PATCH] Fixup some ambiguously defined variables Cast a substr back to int --- languages/Language.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/languages/Language.php b/languages/Language.php index a6ae98adf5..1acc15012c 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1086,7 +1086,7 @@ class Language { private static function tsToIranian( $ts ) { $gy = substr( $ts, 0, 4 ) -1600; $gm = substr( $ts, 4, 2 ) -1; - $gd = substr( $ts, 6, 2 ) -1; + $gd = (int)substr( $ts, 6, 2 ) -1; # Days passed from the beginning (including leap years) $gDayNo = 365 * $gy @@ -2503,8 +2503,9 @@ class Language { $tagType = 0; // 0-open, 1-close $bracketState = 0; // 1-tag start, 2-tag name, 0-neither $entityState = 0; // 0-not entity, 1-entity - $tag = $ret = ''; // accumulated tag name, accumulated result string + $tag = $ret = $pRet = ''; // accumulated tag name, accumulated result string $openTags = array(); // open tag stack + $pOpenTags = array(); $textLen = strlen( $text ); $neLength = max( 0, $length - strlen( $ellipsis ) ); // non-ellipsis len if truncated -- 2.20.1