1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 00:56:08 +02:00

use mb_* when needed

This commit is contained in:
vershinin_so
2019-07-08 18:04:33 +03:00
parent ecd871b624
commit f8de7cf628
19 changed files with 42 additions and 64 deletions

View File

@@ -116,7 +116,7 @@ class PushoverHandler extends SocketHandler
private function buildContent(array $record): string
{
// Pushover has a limit of 512 characters on title and message combined.
$maxMessageLength = 512 - Utils::strlen($this->title);
$maxMessageLength = 512 - strlen($this->title);
$message = ($this->useFormattedMessage) ? $record['formatted'] : $record['message'];
$message = Utils::substr($message, 0, $maxMessageLength);
@@ -159,7 +159,7 @@ class PushoverHandler extends SocketHandler
$header = "POST /1/messages.json HTTP/1.1\r\n";
$header .= "Host: api.pushover.net\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . Utils::strlen($content) . "\r\n";
$header .= "Content-Length: " . strlen($content) . "\r\n";
$header .= "\r\n";
return $header;