diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index aed0a8a1ef794..85768cd02647d 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -72,7 +72,7 @@ * Actions */ -if ($action == 'builddoc' && !empty($permissiontoread)) { +if ($action == 'builddoc' && $permissiontoread != 0) { $rap = new pdf_paiement($db); $outputlangs = $langs; @@ -95,7 +95,7 @@ } // Delete file from disk -if ($action == 'removedoc' && !empty($permissiontoread) && $fileToRemove) { +if ($action == 'removedoc' && $permissiontoread != 0 && $fileToRemove) { $fullpathfile = dol_sanitizePathName($dir.'/'.$fileToRemove); $fileDirectory = dirname($fullpathfile); if (dol_delete_file($fullpathfile)) {