http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99286

Revision: 99286
Author:   aaron
Date:     2011-10-08 00:16:31 +0000 (Sat, 08 Oct 2011)
Log Message:
-----------
Fixed getUsablePages() to account for the fact that getPage() can return null

Modified Paths:
--------------
    trunk/phase3/includes/SpecialPageFactory.php

Modified: trunk/phase3/includes/SpecialPageFactory.php
===================================================================
--- trunk/phase3/includes/SpecialPageFactory.php        2011-10-08 00:04:58 UTC 
(rev 99285)
+++ trunk/phase3/includes/SpecialPageFactory.php        2011-10-08 00:16:31 UTC 
(rev 99286)
@@ -346,11 +346,9 @@
                $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;
                        }


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to