From bb298a57a63781e3ea5e0cae5cc3206f97d7c5b2 Mon Sep 17 00:00:00 2001 From: Henning Leutz <leutz@pcsg.de> Date: Fri, 17 Nov 2023 06:42:51 +0000 Subject: [PATCH] fix: uncaught TypeError: Products::getProduct(): Argument #1 ($pid) must be of type int --- src/QUI/ERP/Accounting/Article.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/QUI/ERP/Accounting/Article.php b/src/QUI/ERP/Accounting/Article.php index 90c2309..7b5e878 100644 --- a/src/QUI/ERP/Accounting/Article.php +++ b/src/QUI/ERP/Accounting/Article.php @@ -241,15 +241,15 @@ public function getView(): ArticleView /** * Return the Article ID * - * @return string|int + * @return int */ public function getId() { if (isset($this->attributes['id'])) { - return $this->attributes['id']; + return (int)$this->attributes['id']; } - return ''; + return 0; } /** -- GitLab