diff --git a/core/ormset.class.inc.php b/core/ormset.class.inc.php index fabc497c4..4b2ff07fd 100644 --- a/core/ormset.class.inc.php +++ b/core/ormset.class.inc.php @@ -264,7 +264,7 @@ class ormSet */ public function Add($oItem) { - if ($this->Count() === $this->iLimit) + if (($this->iLimit != 0) && ($this->Count() === $this->iLimit)) { throw new CoreException("Maximum number of items ({$this->iLimit}) reached for {$this->sClass}:{$this->sAttCode}"); }