Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -4943,8 +4943,10 @@ |
4944 | 4944 | |
4945 | 4945 | # Find the target section |
4946 | 4946 | if ( $sectionIndex == 0 ) { |
4947 | | - # Section zero doesn't nest, level=big |
4948 | | - $targetLevel = 1000; |
| 4947 | + if ( !$node ) { |
| 4948 | + # The page definitely exists - we checked that earlier - so it must be blank: see bug #14005 |
| 4949 | + return $text; |
| 4950 | + } |
4949 | 4951 | } else { |
4950 | 4952 | while ( $node ) { |
4951 | 4953 | if ( $node->getName() === 'h' ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -197,6 +197,8 @@ |
198 | 198 | * (bug 28034) uploading file to local wiki when file exists on shared repository |
199 | 199 | (commons) gives spurious info in the warning message |
200 | 200 | * Usernames get lost when selecting different sorts on Special:listfiles |
| 201 | +* (Bug 14005) editing section 0 of an existing but empty page gives no such |
| 202 | + section error |
201 | 203 | |
202 | 204 | === API changes in 1.18 === |
203 | 205 | * (bug 26339) Throw warning when truncating an overlarge API result |