From 43dfde3f057006e619a9f8157106bae2bede9cff Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 3 Dec 2009 22:41:38 +0000 Subject: fixes #1396 - thanks for reporting this git-svn-id: http://code.elgg.org/elgg/trunk@3723 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/api.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'engine/lib/api.php') diff --git a/engine/lib/api.php b/engine/lib/api.php index 05220f8f0..7d9791953 100644 --- a/engine/lib/api.php +++ b/engine/lib/api.php @@ -650,16 +650,14 @@ function serialise_parameters($method, $parameters) { $serialised_parameters .= "," . (float)trim($parameters[$key]); break; case 'array': - // we can handle an array of strings, maybe ints, definitely not booleans or other arrays - if (!is_array($parameters[$key])) - { - throw APIException(sprintf(elgg_echo('APIException:ParameterNotArray'), $key)); + // we can handle an array of strings, maybe ints, definitely not booleans or other arrays + if (!is_array($parameters[$key])) { + throw new APIException(sprintf(elgg_echo('APIException:ParameterNotArray'), $key)); } - + $array = "array("; - foreach ($parameters[$key] as $k => $v) - { + foreach ($parameters[$key] as $k => $v) { $k = sanitise_string($k); $v = sanitise_string($v); -- cgit v1.2.3