Merge pull request #18785 from hregis/fix_warning_php8
FIX check if method exists instead in class
This commit is contained in:
commit
c433d6ef4f
@ -236,7 +236,9 @@ if ($action == 'update' && !empty($permissiontoadd)) {
|
||||
|
||||
if ($conf->categorie->enabled) {
|
||||
$categories = GETPOST('categories', 'array');
|
||||
$object->setCategories($categories);
|
||||
if (method_exists($object, 'setCategories')) {
|
||||
$object->setCategories($categories);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user