mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-27 02:21:43 +01:00
TelegramBotHandler: skipping messages containing only whitespace (#1992)
#fixes https://github.com/Seldaek/monolog/issues/1991
This commit is contained in:
@@ -253,6 +253,10 @@ class TelegramBotHandler extends AbstractProcessingHandler
|
|||||||
|
|
||||||
protected function sendCurl(string $message): void
|
protected function sendCurl(string $message): void
|
||||||
{
|
{
|
||||||
|
if ('' === trim($message)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
$url = self::BOT_API . $this->apiKey . '/SendMessage';
|
$url = self::BOT_API . $this->apiKey . '/SendMessage';
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
|
|||||||
Reference in New Issue
Block a user