diff --git a/CHANGELOG.md b/CHANGELOG.md index 0410b25..0f41280 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## [Unreleased] +### Build +- **PHP:** bump PHP major version to min 7.4 (d5b1ff1) + ### Chore - **composer:** bump adhocore/cli (6647c9d) diff --git a/application/Components/Auth.php b/application/Components/Auth.php index 978c809..4faa870 100644 --- a/application/Components/Auth.php +++ b/application/Components/Auth.php @@ -164,11 +164,8 @@ private function logSessionInfo() ])->execute(); // Insert Table `session_log` - $sid = app()->pdo->createCommand('SELECT `id` FROM `sessions` WHERE `session` = :jit')->bindParams([ - 'jit' => $this->cur_user_jit - ])->queryScalar(); - app()->pdo->createCommand('INSERT INTO `session_log` (`sid`, `access_at`, `access_ip`, `user_agent`) VALUES (:sid, NOW(), INET6_ATON(:access_ip), :ua)')->bindParams([ - 'sid' => $sid, 'access_ip' => $now_ip, 'ua' => $ua + app()->pdo->createCommand('INSERT INTO `session_log` (`sid`, `access_at`, `access_ip`, `user_agent`) VALUES ((SELECT `id` FROM `sessions` WHERE `session` = :jit), NOW(), INET6_ATON(:access_ip), :ua)')->bindParams([ + 'jit' => $this->cur_user_jit, 'access_ip' => $now_ip, 'ua' => $ua ])->execute(); } }