mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
修正一些存在的警告错误
This commit is contained in:
@@ -20,7 +20,7 @@ class Sae
|
||||
];
|
||||
|
||||
// 实例化并传入参数
|
||||
public function __construct($config = [])
|
||||
public function __construct(array $config = [])
|
||||
{
|
||||
$this->config = array_merge($this->config, $config);
|
||||
}
|
||||
@@ -31,7 +31,7 @@ class Sae
|
||||
* @param array $log 日志信息
|
||||
* @return void
|
||||
*/
|
||||
public function save($log = [])
|
||||
public function save(array $log = [])
|
||||
{
|
||||
static $is_debug = null;
|
||||
$now = date($this->config['log_time_format']);
|
||||
@@ -60,9 +60,9 @@ class Sae
|
||||
|
||||
$logstr = "[{$now}] {$_SERVER['SERVER_ADDR']} {$_SERVER['REMOTE_ADDR']} {$_SERVER['REQUEST_URI']}\r\n{$info}\r\n";
|
||||
if (is_null($is_debug)) {
|
||||
$appSettings=[];
|
||||
preg_replace_callback('@(\w+)\=([^;]*)@', function($match)use(&$appSettings){
|
||||
$appSettings[$match['1']]=$match['2'];
|
||||
$appSettings = [];
|
||||
preg_replace_callback('@(\w+)\=([^;]*)@', function ($match) use (&$appSettings) {
|
||||
$appSettings[$match['1']] = $match['2'];
|
||||
}, $_SERVER['HTTP_APPCOOKIE']);
|
||||
$is_debug = in_array($_SERVER['HTTP_APPVERSION'], explode(',', $appSettings['debug'])) ? true : false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user