Skip to content

Commit

Permalink
Cron: Add an additional file_exists check after scandir()
Browse files Browse the repository at this point in the history
Fixes #33
  • Loading branch information
kovshenin committed Feb 3, 2024
1 parent 54f57a6 commit 3d36f19
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@

foreach ( $files as $filename ) {
// Some files after scandir may already be gone/renamed.
if ( ! file_exists( $filename ) ) {
continue;
}

$stat = @stat( $filename );
if ( ! $stat ) {
continue;
Expand Down

0 comments on commit 3d36f19

Please sign in to comment.