Fix report error only if return code < 0

This commit is contained in:
Laurent Destailleur
2019-01-30 12:23:34 +01:00
parent 205b7f2e95
commit f955f3f4ee

View File

@@ -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();
}