Error messages for category

This commit is contained in:
Yoan Mollard 2022-07-27 21:34:36 +02:00
parent d8fa7d84cc
commit 6519edabc5

View File

@ -332,6 +332,7 @@ class Categorie extends CommonObject
// Check parameters
if (empty($id) && empty($label) && empty($ref_ext)) {
$this->error = "No category to search for";
return -1;
}
if (!is_null($type) && !is_numeric($type)) {
@ -389,6 +390,7 @@ class Categorie extends CommonObject
return 1;
} else {
$this->error = "No category found";
return 0;
}
} else {