From 36ae199d4951b01b339124916e408fcf90e021db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 19 Apr 2021 14:55:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Shutdown.php | 3 +-- System/Snowflake.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/HttpServer/Shutdown.php b/HttpServer/Shutdown.php index 87376d8d..968c556d 100644 --- a/HttpServer/Shutdown.php +++ b/HttpServer/Shutdown.php @@ -48,8 +48,7 @@ class Shutdown extends Component { clearstatcache(storage()); $output = shell_exec('[ -f /.dockerenv ] && echo yes || echo no'); - var_dump($output); - if ($output === 'yes') { + if (trim($output) === 'yes') { return; } diff --git a/System/Snowflake.php b/System/Snowflake.php index d5e31706..e5f0c29d 100644 --- a/System/Snowflake.php +++ b/System/Snowflake.php @@ -244,7 +244,7 @@ class Snowflake public static function isDcoker(): bool { exec('[ -f /.dockerenv ] && echo yes || echo no', $output, $cod); - if ($cod === 0 && $output === 'yes') { + if ($cod === 0 && trim($output) === 'yes') { return true; } return false;