Skip to content

Commit

Permalink
Update rapport.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Daoud-mohamed authored Nov 14, 2024
1 parent 9a657f3 commit 284a0b3
Showing 1 changed file with 2 additions and 2 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' && !empty($permissiontoread)) {
if ($action == 'builddoc' && $permissiontoread != 0) {

Check failure on line 75 in htdocs/compta/paiement/rapport.php

View workflow job for this annotation

GitHub Actions / phpstan

Loose comparison using != between true and 0 will always evaluate to true.

Check failure on line 75 in htdocs/compta/paiement/rapport.php

View workflow job for this annotation

GitHub Actions / phpstan / php-stan (8.2)

Loose comparison using != between true and 0 will always evaluate to true.
$rap = new pdf_paiement($db);

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

// Delete file from disk
if ($action == 'removedoc' && !empty($permissiontoread) && $fileToRemove) {
if ($action == 'removedoc' && $permissiontoread != 0 && $fileToRemove) {

Check failure on line 98 in htdocs/compta/paiement/rapport.php

View workflow job for this annotation

GitHub Actions / phpstan

Loose comparison using != between true and 0 will always evaluate to true.

Check failure on line 98 in htdocs/compta/paiement/rapport.php

View workflow job for this annotation

GitHub Actions / phpstan / php-stan (8.2)

Loose comparison using != between true and 0 will always evaluate to true.
$fullpathfile = dol_sanitizePathName($dir.'/'.$fileToRemove);
$fileDirectory = dirname($fullpathfile);
if (dol_delete_file($fullpathfile)) {
Expand Down

0 comments on commit 284a0b3

Please sign in to comment.