From: Tim Starling Date: Wed, 18 Feb 2009 06:04:09 +0000 (+0000) Subject: Don't give a warning if there are no files in the page set. X-Git-Tag: 1.31.0-rc.0~42812 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/File:Does_not_exist.jpg?a=commitdiff_plain;h=dc401069608bde62d4930ac0e3ff0e8364dec6df;p=lhc%2Fweb%2Fwiklou.git Don't give a warning if there are no files in the page set. --- diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index 0fe5a23ea9..b98d2ad9bf 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -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'])) {