aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-03 22:41:38 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-03 22:41:38 +0000
commit43dfde3f057006e619a9f8157106bae2bede9cff (patch)
tree097e5fd3ffebb7db5ef9841e88f347d6e76f61d1 /engine/lib
parent21e0f44aa5c8af9f2a12a8636ec3af3826f39dfb (diff)
downloadelgg-43dfde3f057006e619a9f8157106bae2bede9cff.tar.gz
elgg-43dfde3f057006e619a9f8157106bae2bede9cff.tar.bz2
fixes #1396 - thanks for reporting this
git-svn-id: http://code.elgg.org/elgg/trunk@3723 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/api.php12
1 files changed, 5 insertions, 7 deletions
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);