Skip to content

Commit

Permalink
API: Fix PHP error when given a list of uids to delete. Bug #12790
Browse files Browse the repository at this point in the history
When we pass an array of uids to delete,
we should return after processing them.

Fixes this error when using a Kolab backend:
2013-10-23T10:53:27+02:00 WARN: HORDE [mnemo] PHP ERROR: base64_encode() expects parameter 1 to be string, array given [pid 11460 on line 375 of "/datastore/share/pear/Horde/Url.php"]

Signed-off-by: Michael J Rubinsky <mrubinsk@horde.org>
  • Loading branch information
thomasjfox authored and mrubinsk committed Oct 28, 2013
1 parent 22b5441 commit a5a9141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mnemo/lib/Api.php
Expand Up @@ -366,9 +366,9 @@ public function delete($uid)
foreach ($uid as $u) {
$result = $this->delete($u);
}
return;
}


$storage = $GLOBALS['injector']->getInstance('Mnemo_Factory_Driver')->create();
$memo = $storage->getByUID($uid);
if (!$GLOBALS['registry']->isAdmin() &&
Expand Down

0 comments on commit a5a9141

Please sign in to comment.