From a8eda05b9c4d40717ceee843f846a0c61f790ceb Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Tue, 21 Sep 2004 18:15:37 +0000 Subject: [PATCH] fix a problem by not inserting __MWTEMPLATESECTION for section titles that don't exist --- includes/Parser.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/Parser.php b/includes/Parser.php index 1b27441469..8223bea309 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1857,9 +1857,11 @@ class Parser $text = ''; $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]; $hl = $matches[$i + 1]; + if ($hl == "") continue; if( strstr($hl, "__MWTEMPLATESECTION") ) { $text .= $hl; continue; -- 2.20.1