From 55e5c0d92fbcfeff948b40b9c55b2d349a61f07d Mon Sep 17 00:00:00 2001 From: shadlaws Date: Thu, 13 Jun 2013 16:34:50 +0200 Subject: [PATCH] Make Controller_Rest_Items a bit more tolerant with the urls parameter. --- modules/gallery/classes/Gallery/Controller/Rest/Items.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gallery/classes/Gallery/Controller/Rest/Items.php b/modules/gallery/classes/Gallery/Controller/Rest/Items.php index b6e841418a..893fcf4699 100644 --- a/modules/gallery/classes/Gallery/Controller/Rest/Items.php +++ b/modules/gallery/classes/Gallery/Controller/Rest/Items.php @@ -75,7 +75,7 @@ public static function get_members($id, $params) { } else if ($urls = Arr::get($params, "urls")) { // Members are taken from a list of urls, filtered by name and type. // @todo: json_decode is what was used in 3.0, but should we allow comma-separated lists, too? - foreach (json_decode($urls) as $url) { + foreach (json_decode($urls, true) as $url) { list ($m_type, $m_id, $m_params) = Rest::resolve($url); if ($m_type != "item") { throw Rest_Exception::factory(400, array("urls" => "invalid"));