mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-03 19:57:41 +02:00
Fixes
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
namespace Monolog\Handler;
|
namespace Monolog\Handler;
|
||||||
|
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
|
use Monolog\Utils;
|
||||||
use Monolog\Formatter\FormatterInterface;
|
use Monolog\Formatter\FormatterInterface;
|
||||||
use Monolog\Formatter\LineFormatter;
|
use Monolog\Formatter\LineFormatter;
|
||||||
use Swift_Message;
|
use Swift_Message;
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
namespace Monolog\Handler;
|
namespace Monolog\Handler;
|
||||||
|
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
|
use Monolog\Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs to syslog service.
|
* Logs to syslog service.
|
||||||
|
@@ -248,12 +248,12 @@ class TelegramBotHandler extends AbstractProcessingHandler
|
|||||||
|
|
||||||
$result = Curl\Util::execute($ch);
|
$result = Curl\Util::execute($ch);
|
||||||
if (!is_string($result)) {
|
if (!is_string($result)) {
|
||||||
throw new RuntimeException('Telegram API error. Description: No response' . Utils::getRecordMessageForException($record));
|
throw new RuntimeException('Telegram API error. Description: No response');
|
||||||
}
|
}
|
||||||
$result = json_decode($result, true);
|
$result = json_decode($result, true);
|
||||||
|
|
||||||
if ($result['ok'] === false) {
|
if ($result['ok'] === false) {
|
||||||
throw new RuntimeException('Telegram API error. Description: ' . $result['description'] . Utils::getRecordMessageForException($record));
|
throw new RuntimeException('Telegram API error. Description: ' . $result['description']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user