2
0
forked from Wavyzz/dolibarr

Better error management

This commit is contained in:
Laurent Destailleur
2025-09-28 23:17:26 +02:00
parent 3c57870e31
commit e73ca1d749

View File

@@ -2068,7 +2068,10 @@ class FormFile
if ($id) {
$result = $object_instance->fetch($id);
} else {
if (!($result = $object_instance->fetch(0, $ref))) {
$result = $object_instance->fetch(0, $ref);
if ($result < 0) {
print $object_instance->error;
} elseif ($result == 0) {
// fetchOneLike looks for objects with wildcards in its reference.
// It is useful for those masks who get underscores instead of their actual symbols (because the _ had replaced all forbidden chars into filename)
// TODO Example when this is needed ?