From 790fe6b703f644460596cf0b354b3ca168854575 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 3 May 2017 07:59:47 +0000 Subject: [PATCH] dblayeroo: if the primary key is defined, the unique are not mandatory git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3563 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- dblayeroo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dblayeroo.php b/dblayeroo.php index 5640a43..e929a29 100644 --- a/dblayeroo.php +++ b/dblayeroo.php @@ -1882,10 +1882,10 @@ class dblayeroo if ($this->table === null) $this->DBException (dgettext ("domframework", "No table name defined to insert in the table")); - if ($this->unique === null) + if ($this->unique === null && $this->primary === null) $this->DBException (dgettext ("domframework", "Unique fields of table are not defined")); - if (! is_array ($this->unique)) + if (! is_array ($this->unique) && $this->unique !== null) $this->DBException (dgettext ("domframework", "The unique configuration is not an array")); switch ($this->command)