From: River Tarnell Date: Tue, 21 Sep 2004 19:03:39 +0000 (+0000) Subject: don't error on certain inputs if $matches[] doesn't have a last element X-Git-Tag: 1.5.0alpha1~1908 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=dbdac8ca5ba134f7bd4872bd9874c535db6900be;p=lhc%2Fweb%2Fwiklou.git don't error on certain inputs if $matches[] doesn't have a last element --- diff --git a/includes/Parser.php b/includes/Parser.php index 12756481df..04ab74f19f 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1858,10 +1858,9 @@ class Parser $nsec = 0; for( $i = 0; $i < count($matches); $i += 2 ) { wfDebug("text=[".$matches[$i]."] heading=[".$matches[$i+1]."]\n"); - if ($matches[$i] == "" && $matches[$i + 1] == "") break; $text .= $matches[$i]; + if (!isset($matches[$i + 1]) || $matches[$i + 1] == "") continue; $hl = $matches[$i + 1]; - if ($hl == "") continue; if( strstr($hl, "