Permalink
Browse files

Fixes parameter parsing

  • Loading branch information...
1 parent 7c9f191 commit 3dfb027428b67de30316a3f6e99ecbb7520fec25 @dokipen dokipen committed Feb 12, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 Embedly.php
View
@@ -108,9 +108,15 @@ public function apicall($version, $action, $params)
if (!array_key_exists('urls', $params)) {
$params['urls'] = array();
}
+
+ if (!is_array($params['urls'])) {
+ $urls = array($params['urls']);
+ $params['urls'] = $urls;
+ }
+
if (array_key_exists('url', $params) && $params['url']) {
array_push($params['urls'], $params['url']);
- delete($params['url']);
+ unset($params['url']);
}
$rejects = array();

0 comments on commit 3dfb027

Please sign in to comment.