Skip to content

Commit 77aef96

Browse files
committed
SQLitePDO update
1 parent a134c80 commit 77aef96

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/DB/SQLitePDO.class.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
**/
2020
final class SQLitePDO extends Sequenceless
2121
{
22+
23+
const ERROR_CONSTRAINT = 19;
2224
/**
2325
* @var PDO
2426
*/
@@ -90,7 +92,7 @@ public function queryRaw($queryString)
9092
} catch (PDOException $e) {
9193
$code = $e->getCode();
9294

93-
if ($code == 19)
95+
if ($code == self::ERROR_CONSTRAINT)
9496
$e = 'DuplicateObjectException';
9597
else
9698
$e = 'DatabaseException';

0 commit comments

Comments
 (0)