Index: trunk/phase3/includes/CoreParserFunctions.php |
— | — | @@ -218,12 +218,12 @@ |
219 | 219 | |
220 | 220 | static function pagesincategory( $parser, $category = '', $raw = null ) { |
221 | 221 | global $wgExpensiveParserFunctionLimit; |
222 | | - if ($category == '') { |
| 222 | + $category = Category::newFromName($category); |
| 223 | + if( !is_object( $category ) ) { |
223 | 224 | return 0; |
224 | 225 | } |
225 | 226 | $parser->mExpensiveFunctionCount++; |
226 | 227 | if ($parser->mExpensiveFunctionCount <= $wgExpensiveParserFunctionLimit) { |
227 | | - $category = Category::newFromName($category); |
228 | 228 | $count = $category->getPageCount(); |
229 | 229 | if ( !$count ) { |
230 | 230 | $count = 0; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -200,6 +200,7 @@ |
201 | 201 | * (bug 13768) pt_title field encoding fixed |
202 | 202 | * Do not display empty columns on Special:UserRights if all groups are |
203 | 203 | changeable or all unchangeable |
| 204 | +* Fix fatal error on calling PAGESINCATEGORY with invalid category name |
204 | 205 | |
205 | 206 | |
206 | 207 | === API changes in 1.13 === |