Yaffs site version 1.1
[yaffs-website] / vendor / symfony / var-dumper / Dumper / AbstractDumper.php
index ec8189b64be9c1604f77490e29a6ca116167944b..4e72c1887fe4007732ab0aef33ef4a5b6cb1ae72 100644 (file)
@@ -167,6 +167,9 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
      */
     protected function utf8Encode($s)
     {
+        if (!function_exists('iconv')) {
+            throw new \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.');
+        }
         if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) {
             return $c;
         }