From dbdac8ca5ba134f7bd4872bd9874c535db6900be Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Tue, 21 Sep 2004 19:03:39 +0000 Subject: [PATCH] don't error on certain inputs if $matches[] doesn't have a last element --- includes/Parser.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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, "