From 354b4a7417a0cdccefadc52b268079d84087dcc2 Mon Sep 17 00:00:00 2001 From: Faustin Date: Fri, 17 Jun 2022 06:03:48 +0200 Subject: [PATCH 1/3] BUG FIX Deprecated attribute fk_projet wasn't declared on class CommonObject --- htdocs/core/class/commonobject.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 9b8fea19e5f..71ecd3f75d1 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -186,6 +186,12 @@ abstract class CommonObject */ public $projet; + /** + * @deprecated + * @see fk_project + */ + public $fk_projet; + /** * @var Contact a related contact * @see fetch_contact() From 14c932e06b5890aea9dcd95f4e1a44169d547031 Mon Sep 17 00:00:00 2001 From: Faustin Date: Fri, 17 Jun 2022 07:53:07 +0200 Subject: [PATCH 2/3] BUG FIX attribute commande_id wasn't declared on class Delivery --- htdocs/delivery/class/delivery.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php index 2c43cd715a3..9edc080701b 100644 --- a/htdocs/delivery/class/delivery.class.php +++ b/htdocs/delivery/class/delivery.class.php @@ -106,6 +106,8 @@ class Delivery extends CommonObject */ public $model_pdf; + public $commande_id; + public $lines = array(); From 806dd8f8e029170e5823460a38522b4b451878dd Mon Sep 17 00:00:00 2001 From: John BOTELLA Date: Fri, 17 Jun 2022 10:35:01 +0200 Subject: [PATCH 3/3] Fix comment doc --- htdocs/core/class/validate.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/validate.class.php b/htdocs/core/class/validate.class.php index ac4c14f7937..9d8832c36ce 100644 --- a/htdocs/core/class/validate.class.php +++ b/htdocs/core/class/validate.class.php @@ -300,13 +300,13 @@ class Validate /** * Check for all values in db * - * @param array $values Boolean to validate + * @param integer $id of element * @param string $classname the class name * @param string $classpath the class path * @return boolean Validity is ok or not * @throws Exception */ - public function isFetchable($values, $classname, $classpath) + public function isFetchable($id, $classname, $classpath) { if (!empty($classpath)) { if (dol_include_once($classpath)) { @@ -319,7 +319,7 @@ class Validate return false; } - if (!empty($object->table_element) && $object->isExistingObject($object->table_element, $values)) { + if (!empty($object->table_element) && $object->isExistingObject($object->table_element, $id)) { return true; } else { $this->error = $this->outputLang->trans('RequireValidExistingElement'); } } else { $this->error = $this->outputLang->trans('BadSetupOfFieldClassNotFoundForValidation'); }