r64854 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64853‎ | r64854 | r64855 >
Date:06:23, 10 April 2010
Author:nad
Status:deferred
Tags:
Comment:
avoid warning when brace mismatch
Modified paths:
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -798,7 +798,7 @@
799799 while ( preg_match( "/\\{\\{\\s*([#a-z0-9_]*)|\\}\\}/is", $content, $match, PREG_OFFSET_CAPTURE, $index ) ) {
800800 $index = $match[0][1] + 2;
801801 if ( $match[0][0] == '}}' ) {
802 - if ( $depth > 0 ) {
 802+ if ( $depth > 0 && array_key_exists( $depth - 1, $depths ) ) {
803803 $brace =& $braces[$depths[$depth - 1]];
804804 $brace['LENGTH'] = $match[0][1] - $brace['OFFSET'] + 2;
805805 $brace['DEPTH'] = $depth--;

Status & tagging log