Skip to content

Commit 50dea20

Browse files
authored
Don't delete directory unless it has been set up (#6877)
In case the xdebug extension is not loaded, the directory variable contains `null`.
1 parent 0672791 commit 50dea20

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/unit/C3Test.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ protected function _tearDown()
3333
{
3434
unset($_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE_DEBUG']);
3535
unset($_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE']);
36-
\Codeception\Util\FileSystem::deleteDir($this->c3_dir);
36+
37+
if (is_string($this->c3_dir)) {
38+
\Codeception\Util\FileSystem::deleteDir($this->c3_dir);
39+
}
3740

3841
if (method_exists('CodeCoverage', 'deactivate')) {
3942
// PHPUnit 10+

0 commit comments

Comments
 (0)