From fe09423d2083479eb98402cd81dc292d09530025 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Thu, 23 Jun 2022 11:55:20 +0200 Subject: [PATCH] FIX compatibility php 8 : compare empty string and zero int for reception --- htdocs/reception/class/reception.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 958528e2fe7..f7d695abaad 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -600,7 +600,7 @@ class Reception extends CommonObject $inventorycode = ''; $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->cost_price, $langs->trans("ReceptionValidatedInDolibarr", $numref), '', '', '', '', 0, $inventorycode); - if ($result < 0) { + if (intval($result) < 0) { $error++; $this->errors[] = $mouvS->error; $this->errors = array_merge($this->errors, $mouvS->errors); @@ -614,7 +614,7 @@ class Reception extends CommonObject $inventorycode = ''; $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->cost_price, $langs->trans("ReceptionValidatedInDolibarr", $numref), $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, '', 0, $inventorycode); - if ($result < 0) { + if (intval($result) < 0) { $error++; $this->errors[] = $mouvS->error; $this->errors = array_merge($this->errors, $mouvS->errors);