Skip to content

Commit 6a9c42a

Browse files
committed
Fix mariaDB str_ends_with
1 parent ce620a6 commit 6a9c42a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Database/Adapter/MariaDB.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1798,7 +1798,7 @@ protected function processException(PDOException $e): \Exception
17981798

17991799
// Duplicate row
18001800
if ($e->getCode() === '23000' && isset($e->errorInfo[1]) && $e->errorInfo[1] === 1062) {
1801-
if (str_ends_with($e->getMessage(), "._uid'")) {
1801+
if (str_ends_with($e->getMessage(), "._uid'") || str_ends_with($e->getMessage(), "'_uid'")) {
18021802
return new DuplicateException('Document already exists', $e->getCode(), $e);
18031803
}
18041804

0 commit comments

Comments
 (0)