Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
binal-7span authored and Lapsus committed May 8, 2019
1 parent a0cf2cf commit 9f5535c
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 9f5535c

Please sign in to comment.