From 98805d574c529a031c782098c5afa9d33f2973c9 Mon Sep 17 00:00:00 2001 From: Cristiano Verondini Date: Wed, 19 Aug 2026 13:50:37 +0200 Subject: [PATCH] Small bug for quoted strings --- src/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/functions.php b/src/functions.php index eb8256b..9a0ec08 100755 --- a/src/functions.php +++ b/src/functions.php @@ -99,10 +99,10 @@ function _envCast($value, $default = null) return; } - if (strpos($value, '"') === 0 && strpos($value, '"') === strlen($value) - 1) { + if (str_starts_with($value, '"') && str_ends_with($value, '"') && strlen($value) >= 2) { return substr($value, 1, -1); } - + return $value; } }