Index: trunk/extensions/TitleBlacklist/TitleBlacklist.list.php |
— | — | @@ -325,6 +325,9 @@ |
326 | 326 | * else false if it doesn't match (or was overridden) |
327 | 327 | */ |
328 | 328 | public function matches( $title, $action ) { |
| 329 | + if ( !$title ) { |
| 330 | + return false; |
| 331 | + } |
329 | 332 | wfSuppressWarnings(); |
330 | 333 | $match = preg_match( "/^(?:{$this->mRegex})$/us" . ( isset( $this->mParams['casesensitive'] ) ? '' : 'i' ), $title->getFullText() ); |
331 | 334 | wfRestoreWarnings(); |
Index: branches/wmf/1.18wmf1/extensions/TitleBlacklist/TitleBlacklist.list.php |
— | — | @@ -322,6 +322,9 @@ |
323 | 323 | * else false if it doesn't match (or was overridden) |
324 | 324 | */ |
325 | 325 | public function matches( $title, $action ) { |
| 326 | + if ( !$title ) { |
| 327 | + return false; |
| 328 | + } |
326 | 329 | wfSuppressWarnings(); |
327 | 330 | $match = preg_match( "/^(?:{$this->mRegex})$/us" . ( isset( $this->mParams['casesensitive'] ) ? '' : 'i' ), $title->getFullText() ); |
328 | 331 | wfRestoreWarnings(); |