diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-12-04 12:48:37 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-12-04 12:48:37 +0000 |
commit | 79d887cc9b2d32ba155d6fefcd1a7c40c0a7fc94 (patch) | |
tree | fa336f36e79a552ee6af7efad2b942a64445e4b1 /engine | |
parent | 43dfde3f057006e619a9f8157106bae2bede9cff (diff) | |
download | elgg-79d887cc9b2d32ba155d6fefcd1a7c40c0a7fc94.tar.gz elgg-79d887cc9b2d32ba155d6fefcd1a7c40c0a7fc94.tar.bz2 |
fixes #1397 and updates unit tests - comma was missing
git-svn-id: http://code.elgg.org/elgg/trunk@3724 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/api.php | 1 | ||||
-rw-r--r-- | engine/tests/services/api.php | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/engine/lib/api.php b/engine/lib/api.php index 7d9791953..9fbca5714 100644 --- a/engine/lib/api.php +++ b/engine/lib/api.php @@ -667,6 +667,7 @@ function serialise_parameters($method, $parameters) { $array = trim($array,","); $array .= ")"; + $array = ",$array"; $serialised_parameters .= $array; break; diff --git a/engine/tests/services/api.php b/engine/tests/services/api.php index 2acda5823..b9dfda8f5 100644 --- a/engine/tests/services/api.php +++ b/engine/tests/services/api.php @@ -264,19 +264,19 @@ class ElggCoreServicesApiTest extends ElggCoreUnitTest { $this->registerFunction(false, false, array('param1' => array('type' => 'array')));
$parameters = array('param1' => array('one', 'two'));
$s = serialise_parameters('test', $parameters);
- $this->assertIdentical($s, "array('0'=>'one','1'=>'two')");
+ $this->assertIdentical($s, ",array('0'=>'one','1'=>'two')");
// associative array of strings
$this->registerFunction(false, false, array('param1' => array('type' => 'array')));
$parameters = array('param1' => array('first' => 'one', 'second' => 'two'));
$s = serialise_parameters('test', $parameters);
- $this->assertIdentical($s, "array('first'=>'one','second'=>'two')");
+ $this->assertIdentical($s, ",array('first'=>'one','second'=>'two')");
// indexed array of strings
$this->registerFunction(false, false, array('param1' => array('type' => 'array')));
$parameters = array('param1' => array(1, 2));
$s = serialise_parameters('test', $parameters);
- $this->assertIdentical($s, "array('0'=>'1','1'=>'2')");
+ $this->assertIdentical($s, ",array('0'=>'1','1'=>'2')");
// test unknown type
$this->registerFunction(false, false, array('param1' => array('type' => 'bad')));
|