File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,6 @@ public static function isUTF8($value = '')
144144 public static function toUTF8 ($ value = '' )
145145 {
146146 if (null !== $ value && !self ::isUTF8 ($ value )) {
147- // PHP8.2 : utf8_encode is deprecated, but mb_convert_encoding always usable
148147 $ value = static ::mbConvertEncoding ($ value );
149148 if ($ value === false ) {
150149 throw new WordException ('Unable to convert text to UTF-8 ' );
@@ -161,8 +160,7 @@ public static function toUTF8($value = '')
161160 */
162161 protected static function mbConvertEncoding ($ value )
163162 {
164- // PHP8.2 : utf8_encode is deprecated, but mb_convert_encoding always usable
165- return (function_exists ('mb_convert_encoding ' )) ? mb_convert_encoding ($ value , 'UTF-8 ' , 'ISO-8859-1 ' ) : utf8_encode ($ value );
163+ return mb_convert_encoding ($ value , 'UTF-8 ' , 'ISO-8859-1 ' );
166164 }
167165
168166 /**
You can’t perform that action at this time.
0 commit comments