Skip to content

Commit 23d65b6

Browse files
committed
fixed xlog error when the arguments is not an array
1 parent 8a5bfbf commit 23d65b6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Logger.php

+8
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ public static function __callStatic($name, $arguments)
3939
$name = 'debug';
4040
}
4141

42+
if (!is_array($arguments)) {
43+
$arguments= [$arguments];
44+
}
45+
46+
if (isset($arguments[1])) {
47+
$arguments[1] = [];
48+
}
49+
4250
if (session_status() == PHP_SESSION_NONE) {
4351
$arguments[1]['sid'] = session_id();
4452
} else {

0 commit comments

Comments
 (0)