From cdfd18a0bdb0c24b2307f84f710dde2abac6df47 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 3 Jun 2017 11:04:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E7=8E=AF=E5=A2=83=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E7=9A=84=E5=B8=83=E5=B0=94=E5=80=BC=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Env.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/think/Env.php b/library/think/Env.php index 6f31841d..fa87897c 100644 --- a/library/think/Env.php +++ b/library/think/Env.php @@ -23,6 +23,11 @@ class Env { $result = getenv(ENV_PREFIX . strtoupper(str_replace('.', '_', $name))); if (false !== $result) { + if ('false' === $result) { + $result = false; + } elseif ('true' === $result) { + $result = true; + } return $result; } else { return $default;