mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Fix report error only if return code < 0
This commit is contained in:
@@ -91,7 +91,7 @@ if ($action == 'presend')
|
||||
if ((! $file || ! is_readable($file)) && method_exists($object, 'generateDocument'))
|
||||
{
|
||||
$result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result <= 0) {
|
||||
if ($result < 0) {
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user