@@ -182,8 +182,8 @@ |
||
| 182 | 182 | */ |
| 183 | 183 | public function mbJsonEncode(string $input) |
| 184 | 184 | { |
| 185 | - return preg_replace_callback('/\\\\u([0-9a-zA-Z]{4})/', function ($matches) { |
|
| 186 | - return mb_convert_encoding(pack('H*',$matches[1]), 'UTF-8','UTF-16'); |
|
| 185 | + return preg_replace_callback('/\\\\u([0-9a-zA-Z]{4})/', function($matches) { |
|
| 186 | + return mb_convert_encoding(pack('H*', $matches[1]), 'UTF-8', 'UTF-16'); |
|
| 187 | 187 | }, |
| 188 | 188 | json_encode($input, JSON_UNESCAPED_UNICODE) |
| 189 | 189 | ); |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | -if (! function_exists('mb_json_encode')) { |
|
| 75 | +if (!function_exists('mb_json_encode')) { |
|
| 76 | 76 | /** |
| 77 | 77 | * json_encode() for multibyte characters |
| 78 | 78 | * |