From 2a4bd4b0dc8c57c36f9a8f012412ba668fdddea3 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 5 Dec 2018 10:10:45 +0100 Subject: [PATCH] =?UTF-8?q?:green=5Fheart:=20N=C2=B01825=20-=20Fix=20ormse?= =?UTF-8?q?t=20control=20when=20no=20limit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/ormset.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}"); }