From b1313438eab66d1bc80932e9978fa9d03ec4a724 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 3 Feb 2023 10:13:34 -0500 Subject: [PATCH] Add PR #257 which replaces deprecated utf8_encode() with mb_convert_encoding() in PWPNG.php Co-authored-by: jnessier --- wire/core/PWPNG.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wire/core/PWPNG.php b/wire/core/PWPNG.php index b5d0db54..ef8dd64b 100644 --- a/wire/core/PWPNG.php +++ b/wire/core/PWPNG.php @@ -115,7 +115,7 @@ class PWPNG { 'channels' => $ct, 'bits' => $bpc, 'dp' => $dp, - 'palette' => (function_exists('utf8_encode') ? utf8_encode($pal) : $pal), + 'palette' => (function_exists('mb_convert_encoding') ? mb_convert_encoding($pal, 'UTF-8', 'ISO-8859-1') : $pal), 'trans' => $trns, 'alpha' => $ct >= 4 ? true : false, 'interlace' => $interlaced, @@ -149,4 +149,4 @@ class PWPNG { $this->errors[] = $msg; } -} \ No newline at end of file +}