parent
7e732bfb71
commit
d927550d8b
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Silex\Gateway;
|
||||
|
||||
use PDOException;
|
||||
|
||||
final class UniqueViolation
|
||||
{
|
||||
public static function isUniqueViolation(PDOException $ex): bool
|
||||
{
|
||||
return $ex->errorInfo[1] === 1062; // Mysql
|
||||
}
|
||||
}
|
Loading…
Reference in new issue