Skip to content

Commit 75c37d0

Browse files
committed
fix: add hack to insert error with OCI8
Query error: 1400, ORA-01400: cannot insert NULL into ("ORACLE"."db_auth_logins"."identifier"), query: INSERT INTO "db_auth_logins" ("ip_address", "user_agent", "id_type", "identifier", "user_id", "date", "success") VALUES ('0.0.0.0', '', 'email_password', '', NULL, '2022-08-24 22:10:33', 0)
1 parent 4bd544b commit 75c37d0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Models/LoginModel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ public function recordLoginAttempt(
5858
): void {
5959
$this->disableDBDebug();
6060

61+
if ($this->db->getPlatform() === 'OCI8' && $identifier === '') {
62+
$identifier = ' ';
63+
}
64+
6165
$return = $this->insert([
6266
'ip_address' => $ipAddress,
6367
'user_agent' => $userAgent,

0 commit comments

Comments
 (0)