💚 N°1825 - Fix ormset control when no limit

This commit is contained in:
Eric
2018-12-05 10:10:45 +01:00
parent f4f5281769
commit 2a4bd4b0dc

View File

@@ -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}");
}