Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Issue fix #819 (#851)
Browse files Browse the repository at this point in the history
  • Loading branch information
binal-7span authored and rijkvanzanten committed Mar 25, 2019
1 parent 684166b commit bc1765f
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -816,6 +816,11 @@ public function getItems(array $params = [])
{
ArrayUtils::remove($params, 'id');

// Check if single param is set then convert it into boolean
if (ArrayUtils::get($params, 'single')) {
$params['single'] = json_decode(strtolower(ArrayUtils::get($params, 'single')));
}

return $this->fetchData($params);
}

Expand Down Expand Up @@ -1109,7 +1114,7 @@ public function fetchItems(array $params = [], \Closure $queryCallback = null)
$results = array_values($results);
}

if (ArrayUtils::has($params, 'single')) {
if (ArrayUtils::get($params, 'single')) {
$results = reset($results);
}

Expand Down

0 comments on commit bc1765f

Please sign in to comment.