Index: branches/REL1_15/phase3/includes/api/ApiQueryImageInfo.php |
— | — | @@ -224,14 +224,16 @@ |
225 | 225 | public static function processMetaData($metadata, $result) |
226 | 226 | { |
227 | 227 | $retval = array(); |
228 | | - foreach($metadata as $key => $value) |
229 | | - { |
230 | | - $r = array('name' => $key); |
231 | | - if(is_array($value)) |
232 | | - $r['value'] = self::processMetaData($value, $result); |
233 | | - else |
234 | | - $r['value'] = $value; |
235 | | - $retval[] = $r; |
| 228 | + if ( is_array( $metadata ) ) { |
| 229 | + foreach($metadata as $key => $value) |
| 230 | + { |
| 231 | + $r = array('name' => $key); |
| 232 | + if(is_array($value)) |
| 233 | + $r['value'] = self::processMetaData($value, $result); |
| 234 | + else |
| 235 | + $r['value'] = $value; |
| 236 | + $retval[] = $r; |
| 237 | + } |
236 | 238 | } |
237 | 239 | $result->setIndexedTagName($retval, 'metadata'); |
238 | 240 | return $retval; |
Index: branches/REL1_15/phase3/includes/api/ApiQueryCategories.php |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | foreach($params['categories'] as $cat) |
89 | 89 | { |
90 | 90 | $title = Title::newFromText($cat); |
91 | | - if($title->getNamespace() != NS_CATEGORY) |
| 91 | + if(!$title || $title->getNamespace() != NS_CATEGORY) |
92 | 92 | $this->setWarning("``$cat'' is not a category"); |
93 | 93 | else |
94 | 94 | $cats[] = $title->getDBkey(); |
— | — | @@ -239,4 +239,4 @@ |
240 | 240 | public function getVersion() { |
241 | 241 | return __CLASS__ . ': $Id$'; |
242 | 242 | } |
243 | | -} |
\ No newline at end of file |
| 243 | +} |
Property changes on: branches/REL1_15/phase3/includes/api |
___________________________________________________________________ |
Name: svn:mergeinfo |
244 | 244 | + /trunk/phase3/includes/api:48813-48814,48819,48909,49051,49068,49086,49682,49775 |