From c604bf2ba21c4e68b3b080c1446e6c3bae532e85 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 14 Mar 2016 08:39:16 +0800 Subject: [PATCH] * adjust for control send fail. --- framework/base/control.class.php | 2 +- framework/base/router.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/base/control.class.php b/framework/base/control.class.php index 9546f804b1..b03943489e 100644 --- a/framework/base/control.class.php +++ b/framework/base/control.class.php @@ -752,7 +752,7 @@ class baseControl if($type != 'json') die(); $data = (array) $data; - if(helper::isAjaxRequest()) print(json_encode($data)) && die(helper::removeUTF8Bom(ob_get_clean())); + if(helper::isAjaxRequest()) print(json_encode($data)) and die(helper::removeUTF8Bom(ob_get_clean())); /** * 响应非ajax的请求。 diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 47522527d3..334f42c0e3 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1961,8 +1961,8 @@ class baseRouter $errorFile = $this->getLogRoot() . 'php.' . date('Ymd') . '.log.php'; if(!is_file($errorFile)) file_put_contents($errorFile, "\n"); - $fh = @fopen($errorFile, 'a'); - if($fh) fwrite($fh, strip_tags($errorLog)) && fclose($fh); + $fh = fopen($errorFile, 'a'); + if($fh) fwrite($fh, strip_tags($errorLog)) and fclose($fh); /* * 如果debug > 1,显示warning, notice级别的错误。