Skip to content

Commit 4a98375

Browse files
author
Grillo
committed
Fix error in logging when data is empty
1 parent a311bce commit 4a98375

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Telegram.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2844,7 +2844,8 @@ private function sendAPIRequest($url, array $content, $post = true)
28442844
}
28452845
curl_close($ch);
28462846
if (class_exists('TelegramErrorLogger')) {
2847-
TelegramErrorLogger::log(json_decode($result, true), [$this->getData(), $content]);
2847+
$loggerArray = ($this->getData() == null) ? [$content] : [$this->getData(), $content];
2848+
TelegramErrorLogger::log(json_decode($result, true), $loggerArray);
28482849
}
28492850

28502851
return $result;

0 commit comments

Comments
 (0)