From d70f68099fd9b7a5f824b70a32b4f5da25c7f34a Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 28 Jan 2023 23:41:44 +0000 Subject: [PATCH] also stringify numbers --- core/polyfills.php | 3 +++ 1 file changed, 3 insertions(+) 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(); }