From bb04049903998a8afd0a17c3a415988cf345edb6 Mon Sep 17 00:00:00 2001 From: Jack Wilkinson Date: Wed, 4 Jan 2023 15:32:16 +0000 Subject: [PATCH] Added fix for php < 8.0 --- src/EnvFile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EnvFile.php b/src/EnvFile.php index d38615f..fd3cf81 100644 --- a/src/EnvFile.php +++ b/src/EnvFile.php @@ -105,7 +105,7 @@ public function set($key, $value = null) is_numeric($value) || is_bool($value) || is_null($value) - || (is_string($value) && !str_contains($value, ' ') && $item['token'] === $this->lexer::T_ENV) + || (is_string($value) && strpos($value, ' ') === false && $item['token'] === $this->lexer::T_ENV) ) ? $this->lexer::T_ENV : $this->lexer::T_QUOTED_ENV; return $this;