You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #61144 [VarDumper] Fix dumping on systems that don't have a working iconv (nicolas-grekas)
This PR was merged into the 6.4 branch.
Discussion
----------
[VarDumper] Fix dumping on systems that don't have a working iconv
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix#61141
| License | MIT
Commits
-------
c1729a1 [VarDumper] Fix dumping on systems that don't have a working iconv
Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php
+38-7Lines changed: 38 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -188,17 +188,48 @@ protected function utf8Encode(?string $s): ?string
188
188
return$s;
189
189
}
190
190
191
-
if (!\function_exists('iconv')) {
192
-
thrownew \RuntimeException('Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.');
191
+
if (\function_exists('iconv')) {
192
+
if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) {
0 commit comments