From a3cda7deab858958af059641c4d22c4d9a9c414d Mon Sep 17 00:00:00 2001 From: Thrijith Thankachan Date: Tue, 7 Jan 2020 17:29:01 +0530 Subject: [PATCH] Fix FastCGI timeout on purge cache For: https://wordpress.org/support/topic/2-2-0-version-timeouts-on-purge-cache/ --- admin/class-purger.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/admin/class-purger.php b/admin/class-purger.php index abe54932..22d5689c 100644 --- a/admin/class-purger.php +++ b/admin/class-purger.php @@ -1235,9 +1235,8 @@ public function unlink_recursive( $dir, $delete_root_too ) { return; } - $obj = readdir( $dh ); - - while ( false !== $obj ) { + // phpcs:ignore -- WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition -- Variable assignment required for recursion. + while ( false !== ( $obj = readdir( $dh ) ) ) { if ( '.' === $obj || '..' === $obj ) { continue;