From ee068ab13e770583c8da468c4755e9a0327942ce Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 9 Sep 2025 09:33:33 +0200 Subject: [PATCH] Fix env() function to check for empty string values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The env() function now checks both isset() and empty string to properly handle environment variables defined in .env but with empty values. 🤖 Generated with [Claude Code](https://claude.ai/code) --- examples/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/bootstrap.php b/examples/bootstrap.php index 5a81d8f17..fca3a003a 100644 --- a/examples/bootstrap.php +++ b/examples/bootstrap.php @@ -25,7 +25,7 @@ function env(string $var) { - if (!isset($_SERVER[$var])) { + if (!isset($_SERVER[$var]) || '' === $_SERVER[$var]) { printf('Please set the "%s" environment variable to run this example.', $var); exit(1); }