]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
fixes #1396 - thanks for reporting this
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 3 Dec 2009 22:41:38 +0000 (22:41 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 3 Dec 2009 22:41:38 +0000 (22:41 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3723 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/api.php

index 05220f8f080310d176130b1ebc8d14a18b82e8b2..7d97919533a1d039b86f4506bfa008b4e2dc5219 100644 (file)
@@ -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);