diff --git a/core/polyfills.php b/core/polyfills.php index b2ac4306..b9a56cec 100644 --- a/core/polyfills.php +++ b/core/polyfills.php @@ -808,6 +808,9 @@ function stringer($s): string if (is_string($s)) { return "\"$s\""; // FIXME: handle escaping quotes } + if (is_numeric($s)) { + return "$s"; + } if (method_exists($s, "__toString")) { return $s->__toString(); }