File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -507,10 +507,10 @@ function ($value) use ($that)
507
507
*/
508
508
public function convertEncoding ($ string , $ to , $ from )
509
509
{
510
- if (function_exists ('iconv ' )) {
511
- return iconv ($ from , $ to , $ string );
512
- } elseif (function_exists ('mb_convert_encoding ' )) {
510
+ if (function_exists ('mb_convert_encoding ' )) {
513
511
return mb_convert_encoding ($ string , $ to , $ from );
512
+ } elseif (function_exists ('iconv ' )) {
513
+ return iconv ($ from , $ to , $ string );
514
514
}
515
515
516
516
throw new \RuntimeException ('No suitable convert encoding function (use UTF-8 as your encoding or install the iconv or mbstring extension). ' );
Original file line number Diff line number Diff line change @@ -134,10 +134,10 @@ public function unescapeCharacter($value)
134
134
*/
135
135
private function convertEncoding ($ value , $ to , $ from )
136
136
{
137
- if (function_exists ('iconv ' )) {
138
- return iconv ($ from , $ to , $ value );
139
- } elseif (function_exists ('mb_convert_encoding ' )) {
137
+ if (function_exists ('mb_convert_encoding ' )) {
140
138
return mb_convert_encoding ($ value , $ to , $ from );
139
+ } elseif (function_exists ('iconv ' )) {
140
+ return iconv ($ from , $ to , $ value );
141
141
}
142
142
143
143
throw new \RuntimeException ('No suitable convert encoding function (install the iconv or mbstring extension). ' );
You can’t perform that action at this time.
0 commit comments