Skip to content

Commit 43fdb0e

Browse files
committed
Suppress rmdir too
1 parent 127302c commit 43fdb0e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Context/FeatureContext.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,12 +1444,12 @@ public static function remove_dir( $dir ): void {
14441444
* @var \SplFileInfo $file
14451445
*/
14461446
foreach ( $iterator as $file ) {
1447+
# Suppress warnings for instance when deleting SQLite database files,
1448+
# which appears to emit a warning on Windows.
1449+
# See https://bugs.php.net/bug.php?id=78930.
14471450
if ( $file->isDir() ) {
1448-
rmdir( $file->getPathname() );
1451+
@rmdir( $file->getPathname() );
14491452
} else {
1450-
# Suppress warnings for instance when deleting SQLite database files,
1451-
# which appears to emit a warning on Windows.
1452-
# See https://bugs.php.net/bug.php?id=78930.
14531453
@unlink( $file->getPathname() );
14541454
}
14551455
}

0 commit comments

Comments
 (0)