Update viewcat.php

This commit is contained in:
Laurent Destailleur 2021-10-31 17:36:56 +01:00 committed by GitHub
parent 9a2e1df94a
commit df5b2b6728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -795,7 +795,7 @@ if ($type == Categorie::TYPE_CONTACT) {
$permission = $user->rights->societe->creer;
$contacts = $object->getObjectsInCateg($type, 0, $limit, $offset);
if (!is_array($contacts) && $contacts < 0) {
if (is_numeric($contacts) && $contacts < 0) {
dol_print_error($db, $object->error, $object->errors);
} else {
// Form to add record into a category