Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
Daoud-mohamed committed Nov 13, 2024
1 parent 8bce9dc commit 6a8feca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions htdocs/compta/paiement/rapport.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
* Actions
*/

if ($action == 'builddoc' && $permissiontoread) {
if ($action == 'builddoc' && !empty($permissiontoread)) {
$rap = new pdf_paiement($db);

$outputlangs = $langs;
Expand All @@ -95,7 +95,7 @@
}

// Delete file from disk
if ($action == 'removedoc' && $permissiontoread && $fileToRemove) {
if ($action == 'removedoc' && !empty($permissiontoread) && $fileToRemove) {
$fileDirectory = dirname($dir.'/'.$fileToRemove);
if (dol_delete_file($dir.'/'.$fileToRemove)) {
// Delete empty directory after file deletion
Expand Down
4 changes: 2 additions & 2 deletions htdocs/fourn/facture/rapport.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
* Actions
*/

if ($action == 'builddoc' && $permissiontoread) {
if ($action == 'builddoc' && !empty($permissiontoread)) {
$rap = new pdf_paiement_fourn($db);

$outputlangs = $langs;
Expand All @@ -97,7 +97,7 @@
}

// Delete file from disk
if ($action == 'removedoc' && $permissiontoread && $fileToRemove) {
if ($action == 'removedoc' && !empty($permissiontoread) && $fileToRemove) {
$fileDirectory = dirname($dir.'/'.$fileToRemove);
if (dol_delete_file($dir.'/'.$fileToRemove)) {
// Delete empty directory after file deletion
Expand Down

0 comments on commit 6a8feca

Please sign in to comment.