From 9702b51bd19e3f386f68e51146d85713a207c1e4 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 2 Jun 2021 21:36:47 +0100 Subject: [PATCH] Utils: improve how boolean arguments are displayed in stack traces --- src/utils/Utils.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/Utils.php b/src/utils/Utils.php index 58c4fade6..26081a5de 100644 --- a/src/utils/Utils.php +++ b/src/utils/Utils.php @@ -51,6 +51,7 @@ use function getenv; use function gettype; use function implode; use function is_array; +use function is_bool; use function is_object; use function is_string; use function mb_check_encoding; @@ -421,6 +422,9 @@ final class Utils{ if(is_string($value)){ return "string[" . strlen($value) . "] " . substr(Utils::printable($value), 0, $maxStringLength); } + if(is_bool($value)){ + return $value ? "true" : "false"; + } return gettype($value) . " " . Utils::printable((string) $value); }, $args)); }