PluginProbe
Booking Calendar / 11.8.3
Booking Calendar v11.8.3
11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 10.11.2 All 203 releases
← All changes | js/captcha/captcha.php +6 -1 11.011.8.3 View file →
@@ -288,8 +288,13 @@
288 288
289 289 $file = $this->normalize_path( $dir . $filename );
290 290
291 291 $stat = @stat( $file );
292 + if ( false === $stat || ! isset( $stat['mtime'] ) ) {
293 + // A concurrent CAPTCHA cleanup can remove the file after readdir().
294 + continue;
295 + }
296 +
292 297 if ( ( $stat['mtime'] + $minutes * 60 ) < time() ) {
293 298 // phpcs:ignore WordPress.WP.AlternativeFunctions.unlink_unlink
294 299 if ( ! @wp_delete_file( $file ) ) {
295 300 // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_chmod
@@ -424,5 +429,5 @@
424 429 $path = str_replace( '\\', '/', $path );
425 430 $path = preg_replace( '|/+|', '/', $path );
426 431 return $path;
427 432 }
428 -}
433 +}