From b2dfb3f7917b56967d9ba85dfd338f29300f07cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AD=E9=98=B3?= Date: Thu, 18 May 2017 14:55:56 +0800 Subject: [PATCH] Fix #601 (#705) --- src/Support/Log.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Support/Log.php b/src/Support/Log.php index fc52a17ec..9a9df0d3c 100644 --- a/src/Support/Log.php +++ b/src/Support/Log.php @@ -113,7 +113,7 @@ private static function createDefaultLogger() { $log = new Logger('EasyWeChat'); - if (defined('PHPUNIT_RUNNING')) { + if (defined('PHPUNIT_RUNNING') || php_sapi_name() == 'cli') { $log->pushHandler(new NullHandler()); } else { $log->pushHandler(new ErrorLogHandler());