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)