From a01a6b49f56044de69e62c335eefc36749601f26 Mon Sep 17 00:00:00 2001 From: Julien Rosset Date: Thu, 20 Oct 2022 12:32:30 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20extraction=20propri=C3=A9t=C3=A9?= =?UTF-8?q?=20en=20chaine=20de=20caract=C3=A8res?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/EnvReader/GenericConfig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EnvReader/GenericConfig.php b/src/EnvReader/GenericConfig.php index f900c54..bedc510 100644 --- a/src/EnvReader/GenericConfig.php +++ b/src/EnvReader/GenericConfig.php @@ -110,7 +110,7 @@ abstract class GenericConfig { */ public function getPropertyAsString (string $name, ?string $default = null): string { $value = $this->getProperty($name, $default); - if (!is_string($value) || !is_object($value) || method_exists($value, '__ToString')) { + if (!is_string($value) && !is_object($value) && !method_exists($value, '__ToString')) { throw new RangeException('The "' . $name . '" property is not a valid string : ' . $value); }