From 737cfc633ae1ebff58b9d64983bb95d8c4321c35 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 18 Feb 2009 23:21:51 +0000 Subject: [PATCH] Fix regression in ForeignAPIRepo because somebody changed how the API returned data :) --- includes/filerepo/ForeignAPIFile.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/filerepo/ForeignAPIFile.php b/includes/filerepo/ForeignAPIFile.php index bcea32c817..0a29367618 100644 --- a/includes/filerepo/ForeignAPIFile.php +++ b/includes/filerepo/ForeignAPIFile.php @@ -59,7 +59,14 @@ class ForeignAPIFile extends File { } public function getMetadata() { - return serialize( (array)@$this->mInfo['metadata'] ); + if ( isset( $this->mInfo['metadata'] ) ) { + $ret = array(); + foreach( $this->mInfo['metadata'] as $meta ) { + $ret[ $meta['name'] ] = $meta['value']; + } + return serialize( $ret ); + } + return null; } public function getSize() { -- 2.20.1