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