bug fix: do not create empty event arrays
This commit is contained in:
parent
23977c122e
commit
9d0e5f2cc3
1 changed files with 3 additions and 1 deletions
|
@ -171,7 +171,9 @@ class TwingleApiCall {
|
|||
$response = $this->curlGet($url, $params);
|
||||
$finished = is_null($eventId) || count($response['data']) < $this->limit;
|
||||
$offset = $offset + $this->limit;
|
||||
$result = array_merge($result, $response['data']);
|
||||
if ($response['data']) {
|
||||
$result = array_merge($result, $response['data']);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue