From f73071ac224ddd3704396b12b23c0fb80f0cd24f Mon Sep 17 00:00:00 2001 From: u_mulder Date: Tue, 7 Mar 2023 12:17:52 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=9F=D0=BE=D0=B4=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20warning=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B5=20=D0=BD=D0=B0=20php7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Fetch/Message.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Fetch/Message.php b/src/Fetch/Message.php index 87354bd..714c406 100644 --- a/src/Fetch/Message.php +++ b/src/Fetch/Message.php @@ -600,9 +600,11 @@ class Message $converted = null; if (!$converted && function_exists('mb_convert_encoding')) { + // `@` оставлена для совместимости с php7, так как в этой + // версии выкидывается warning, который надо подавлять try { - if (mb_check_encoding($text, $from)) { - $converted = mb_convert_encoding($text, $to, $from); + if (@mb_check_encoding($text, $from)) { + $converted = @mb_convert_encoding($text, $to, $from); } } catch (\ValueError $e) { // noop