diff options
author | Joas Schilling <coding@schilljs.com> | 2017-03-17 11:10:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-17 11:10:21 +0100 |
commit | c65848effebfbcd46ef55d75f73b137b504e8ad9 (patch) | |
tree | 6765c52f7c970bcf7d4a58fb08e89ef022a6e664 /lib | |
parent | 3f331e02f99d7943c091f2fa3598769100e008d1 (diff) | |
parent | 2ccf544ad7c8bfc54600adb065156f04a8912c9f (diff) | |
download | nextcloud-server-c65848effebfbcd46ef55d75f73b137b504e8ad9.tar.gz nextcloud-server-c65848effebfbcd46ef55d75f73b137b504e8ad9.zip |
Merge pull request #3878 from nextcloud/downstream-26303
Fixed failing test which was ignoring a required (not null) column
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/DB/Connection.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php index a39dbe3783c..4b1c560c5ca 100644 --- a/lib/private/DB/Connection.php +++ b/lib/private/DB/Connection.php @@ -34,6 +34,7 @@ use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Cache\QueryCacheProfile; use Doctrine\Common\EventManager; use Doctrine\DBAL\Platforms\MySqlPlatform; +use Doctrine\DBAL\Exception\ConstraintViolationException; use OC\DB\QueryBuilder\QueryBuilder; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; @@ -284,7 +285,7 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection { }, array_merge($keys, $values)) ); return $insertQb->execute(); - } catch (\Doctrine\DBAL\Exception\ConstraintViolationException $e) { + } catch (ConstraintViolationException $e) { // value already exists, try update $updateQb = $this->getQueryBuilder(); $updateQb->update($table); |