Skip to content

Commit 1ccbba6

Browse files
authored
Possible fix to #164
1 parent ae64eeb commit 1ccbba6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Telegram.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3075,7 +3075,7 @@ public function getUpdates($offset = 0, $limit = 100, $timeout = 0, $update = tr
30753075
$content = ['offset' => $offset, 'limit' => $limit, 'timeout' => $timeout];
30763076
$this->updates = $this->endpoint('getUpdates', $content);
30773077
if ($update) {
3078-
if (count($this->updates['result']) >= 1) { //for CLI working.
3078+
if (is_array($this->updates['result']) && count($this->updates['result']) >= 1) { //for CLI working.
30793079
$last_element_id = $this->updates['result'][count($this->updates['result']) - 1]['update_id'] + 1;
30803080
$content = ['offset' => $last_element_id, 'limit' => '1', 'timeout' => $timeout];
30813081
$this->endpoint('getUpdates', $content);

0 commit comments

Comments
 (0)