r5367 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5366‎ | r5367 | r5368 >
Date:19:09, 21 September 2004
Author:kateturner
Status:old
Tags:
Comment:
fix undefined index errors on certain template section conditions (MFC Parser.php 2.290)
Modified paths:
  • /branches/REL1_3/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: branches/REL1_3/phase3/includes/Parser.php
@@ -1850,8 +1850,8 @@
18511851 for( $i = 0; $i < count($matches); $i += 2 ) {
18521852 if ($matches[$i] == "" && $matches[$i + 1] == "") break;
18531853 $text .= $matches[$i];
 1854+ if (!isset($matches[$i + 1]) || $matches[$i + 1] == "") continue;
18541855 $hl = $matches[$i + 1];
1855 - if( $hl == "" ) continue;
18561856 if( strstr($hl, "<!--MWTEMPLATESECTION") ) {
18571857 $text .= $hl;
18581858 continue;

Status & tagging log