Skip to content

Commit

Permalink
Merge pull request #10 from stopfstedt/getbyids_empty_list
Browse files Browse the repository at this point in the history
ignore empty array of ids, do not query ilios.
  • Loading branch information
ctam authored Mar 20, 2018
2 parents f506ffb + e1f4f8c commit 149fb31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/ilios_client.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function getbyids($object, $ids='', $batchSize = self::DEFAULT_BATCH_SIZE
$filterstrings = array();
if (is_numeric($ids)) {
$filterstrings[] = "?filters[id]=$ids";
} elseif (is_array($ids)) {
} elseif (is_array($ids) && !empty($ids)) {
$offset = 0;
$length = $batchSize;
$remains = count($ids);
Expand Down

0 comments on commit 149fb31

Please sign in to comment.