From: Aaron Schulz Date: Sat, 8 Oct 2011 00:16:31 +0000 (+0000) Subject: Fixed getUsablePages() to account for the fact that getPage() can return null X-Git-Tag: 1.31.0-rc.0~27198 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=73a412607cdfe41fc5f5da17d2ec4c76b293addb;p=lhc%2Fweb%2Fwiklou.git Fixed getUsablePages() to account for the fact that getPage() can return null --- diff --git a/includes/SpecialPageFactory.php b/includes/SpecialPageFactory.php index eb19200f07..22aaa753e5 100644 --- a/includes/SpecialPageFactory.php +++ b/includes/SpecialPageFactory.php @@ -346,11 +346,9 @@ class SpecialPageFactory { $pages = array(); foreach ( self::getList() as $name => $rec ) { $page = self::getPage( $name ); - if ( $page->isListed() - && ( - !$page->isRestricted() - || $page->userCanExecute( $wgUser ) - ) + if ( $page // not null + && $page->isListed() + && ( !$page->isRestricted() || $page->userCanExecute( $wgUser ) ) ) { $pages[$name] = $page; }