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级别的错误。