Skip to content

Commit 3b9452e

Browse files
committed
fix: handle false return value from glob in FactoriesCacheFileVarExportHandlerTest
1 parent 23ab8d3 commit 3b9452e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎tests/system/Cache/FactoriesCacheFileVarExportHandlerTest.php‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ public function testSaveCreatesDirectoryWithCorrectPermissions(): void
4949
}
5050
} finally {
5151
if (is_dir($dir)) {
52-
array_map('unlink', glob("{$dir}/*") ?: []);
52+
$files = glob("{$dir}/*");
53+
54+
if ($files !== false) {
55+
array_map(unlink(...), $files);
56+
}
57+
5358
rmdir($dir);
5459
}
5560
}

0 commit comments

Comments
 (0)