Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 36a977c

Browse files
committed
Fix error when user identifier is null or ''
* Fix error when user identifier is null or '' in method writeLogin()
1 parent 3ebaff6 commit 36a977c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/DatabaseCommand.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ private static function addWhereId($where, &$query, &$params)
199199

200200
private function writeLogin($date, $ids, $user)
201201
{
202+
if (empty($user)) {
203+
return false;
204+
}
202205
$params = array_merge($ids, [
203206
'day' => $date->format('Y-m-d'),
204207
'logins' => 1,

0 commit comments

Comments
 (0)