From e227bdb22b74eabcb8987e374c6261362c05b458 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 21 Sep 2021 17:58:00 +0200 Subject: [PATCH] FIX check if method exists instead --- htdocs/core/actions_addupdatedelete.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index 71288da8335..17b75305ebc 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -236,7 +236,7 @@ if ($action == 'update' && !empty($permissiontoadd)) { if ($conf->categorie->enabled) { $categories = GETPOST('categories', 'array'); - if (!empty($categories)) { + if (method_exists($object, 'setCategories')) { $object->setCategories($categories); } }