From 8e69be7f8d2d6347a208a6864bd36f853964307c Mon Sep 17 00:00:00 2001 From: thibdrev Date: Sat, 20 Jan 2024 21:55:24 +0100 Subject: [PATCH] qual: phpstan htdocs/product/card.php 578 Property CommonObject::$barcode_type (int) does not accept array|string. htdocs/product/card.php 820 Property CommonObject::$barcode_type (int) does not accept array|string. --- htdocs/product/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index a3c487bff35..6e9d0b6ed82 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -575,7 +575,7 @@ if (empty($reshook)) { // Set barcode_type_xxx from barcode_type id $stdobject = new GenericObject($db); $stdobject->element = 'product'; - $stdobject->barcode_type = GETPOST('fk_barcode_type'); + $stdobject->barcode_type = GETPOSTINT('fk_barcode_type'); $result = $stdobject->fetch_barcode(); if ($result < 0) { $error++; @@ -817,7 +817,7 @@ if (empty($reshook)) { // Set barcode_type_xxx from barcode_type id $stdobject = new GenericObject($db); $stdobject->element = 'product'; - $stdobject->barcode_type = GETPOST('fk_barcode_type'); + $stdobject->barcode_type = GETPOSTINT('fk_barcode_type'); $result = $stdobject->fetch_barcode(); if ($result < 0) { $error++;