Don't give a warning if there are no files in the page set.
authorTim Starling <tstarling@users.mediawiki.org>
Wed, 18 Feb 2009 06:04:09 +0000 (06:04 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Wed, 18 Feb 2009 06:04:09 +0000 (06:04 +0000)
includes/api/ApiQueryImageInfo.php

index 0fe5a23..b98d2ad 100644 (file)
@@ -56,9 +56,10 @@ class ApiQueryImageInfo extends ApiQueryBase {
                }
 
                $pageIds = $this->getPageSet()->getAllTitlesByNamespace();
-               $titles = array_keys($pageIds[NS_FILE]);
-               asort($titles); // Ensure the order is always the same
-               if (!empty($titles)) {
+               if ( !empty( $pageIds[NS_FILE] ) ) {
+                       $titles = array_keys($pageIds[NS_FILE]);
+                       asort($titles); // Ensure the order is always the same
+
                        $skip = false;
                        if(!is_null($params['continue']))
                        {