Skip to content

Commit

Permalink
Avoid calling dirname(false)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Apr 27, 2019
1 parent 25ab7f8 commit 9c2fcfd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/TextUI/TestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,13 @@ public function doRun(Test $suite, array $arguments = [], bool $exit = true): Te
$cacheLocation = $_SERVER['PHP_SELF'];
}

$arguments['cacheResultFile'] = \dirname(\realpath($cacheLocation));
$arguments['cacheResultFile'] = null;

$cacheResultFile = \realpath($cacheLocation);

if ($cacheResultFile !== false) {
$arguments['cacheResultFile'] = \dirname($cacheResultFile);
}
}

$cache = new TestResultCache($arguments['cacheResultFile']);
Expand Down

0 comments on commit 9c2fcfd

Please sign in to comment.