diff --git a/ChangeLog b/ChangeLog index 6f84acd3dd4..31decaf9362 100644 --- a/ChangeLog +++ b/ChangeLog @@ -654,7 +654,7 @@ WARNING: -------- The following changes may create regressions for some external modules, but were necessary to make Dolibarr better: -* If a filter is defined into and extrafields "Select from a table", this filter MUST use the Universai Search Filter syntax (field:=:value) instead of field=value. +* If a filter is defined into an extrafield, this filter MUST use the Universai Search Filter syntax (field:=:value) instead of th eunsecured SQL code field=value. See https://wiki.dolibarr.org/index.php?title=Universal_Search_Filter_Syntax * The parameter $filter of methods fetchAll() does not accept array of SQL commands but must be a string of an Universal Search Filter syntax. See https://wiki.dolibarr.org/index.php?title=Universal_Search_Filter_Syntax diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 9cc8d48b56b..026743f28dd 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -785,11 +785,13 @@ class Reception extends CommonObject $this->fetch_origin(); if ($this->origin_object instanceof CommonObject && empty($this->origin_object->lines)) { $res = $this->origin_object->fetch_lines(); - if ($this->origin_object instanceof CommandeFournisseur) { - $this->commandeFournisseur = $this->origin_object; // deprecated - } else { - $this->commandeFournisseur = null; // deprecated + $this->commandeFournisseur = null; // deprecated + if ($res < 0) { + return $res; } + } elseif ($this->origin_object instanceof CommandeFournisseur && empty($this->origin_object->lines)) { + $res = $this->origin_object->fetch_lines(); + $this->commandeFournisseur = $this->origin_object; // deprecated if ($res < 0) { return $res; }