From 7dfd2b0da28749054592f9c5b991ae51ce216a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 11 Sep 2020 18:22:32 +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/Http/Response.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/HttpServer/Http/Response.php b/HttpServer/Http/Response.php index d89d6097..0ce11d94 100644 --- a/HttpServer/Http/Response.php +++ b/HttpServer/Http/Response.php @@ -147,9 +147,12 @@ class Response extends Application private function printResult($result) { $result = Help::toString($result); - $string = PHP_EOL . 'Command Result: ' . PHP_EOL . PHP_EOL; - $string .= empty($result) ? 'success!' : $result . PHP_EOL . PHP_EOL; + if (empty($result)) { + $string .= 'success!' . PHP_EOL . PHP_EOL; + } else { + $string .= $result . PHP_EOL . PHP_EOL; + } $string .= 'Command End!' . PHP_EOL . PHP_EOL; echo $string;