Skip to content

Commit 2f6b33f

Browse files
committed
Suppress second rmdir call
1 parent 43fdb0e commit 2f6b33f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Context/FeatureContext.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,21 +1440,22 @@ public static function remove_dir( $dir ): void {
14401440
\RecursiveIteratorIterator::CHILD_FIRST
14411441
);
14421442

1443+
# Suppress warnings for instance when deleting SQLite database files,
1444+
# which appears to emit a warning on Windows.
1445+
# See https://bugs.php.net/bug.php?id=78930.
1446+
14431447
/**
14441448
* @var \SplFileInfo $file
14451449
*/
14461450
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.
14501451
if ( $file->isDir() ) {
14511452
@rmdir( $file->getPathname() );
14521453
} else {
14531454
@unlink( $file->getPathname() );
14541455
}
14551456
}
14561457

1457-
rmdir( $dir );
1458+
@rmdir( $dir );
14581459
}
14591460

14601461
/**

0 commit comments

Comments
 (0)