Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php |
— | — | @@ -798,9 +798,12 @@ |
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 | | - $brace =& $braces[$depths[$depth - 1]]; |
803 | | - $brace['LENGTH'] = $match[0][1] - $brace['OFFSET'] + 2; |
804 | | - $brace['DEPTH'] = $depth--; |
| 802 | + if ( $depth > 0 ) { |
| 803 | + $brace =& $braces[$depths[$depth - 1]]; |
| 804 | + $brace['LENGTH'] = $match[0][1] - $brace['OFFSET'] + 2; |
| 805 | + $brace['DEPTH'] = $depth--; |
| 806 | + } |
| 807 | + if ( $depth < 0 ) $depth = 0; |
805 | 808 | } |
806 | 809 | else { |
807 | 810 | $depths[$depth++] = count( $braces ); |
Index: trunk/extensions/RecordAdmin/RecordAdmin.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | * @licence GNU General Public Licence 2.0 or later |
13 | 13 | */ |
14 | 14 | |
15 | | -define( 'RECORDADMIN_VERSION', '0.11.7, 2010-03-08' ); |
| 15 | +define( 'RECORDADMIN_VERSION', '0.11.8, 2010-03-09' ); |
16 | 16 | |
17 | 17 | $wgRecordAdminUseNamespaces = false; # Whether record articles should be in a namespace of the same name as their type |
18 | 18 | $wgRecordAdminCategory = 'Records'; # Category containing record types |