Issue #3040166 follow-up by Lendude: mkdir() fails in BrowserHtmlDebugTrait.php:141 because of a race condition

merge-requests/1119/head
Alex Pott 2019-05-18 10:51:53 +02:00
parent f0b2fde4db
commit 1ffbb8ebd7
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ trait BrowserHtmlDebugTrait {
// concurrent test might have made the directory and caused mkdir() to
// fail. In this case we can still use the directory even though we failed
// to make it.
if (!is_dir($this->htmlOutputDirectory) && !mkdir($this->htmlOutputDirectory, 0775, TRUE) && !is_dir($this->htmlOutputDirectory)) {
if (!is_dir($this->htmlOutputDirectory) && !@mkdir($this->htmlOutputDirectory, 0775, TRUE) && !is_dir($this->htmlOutputDirectory)) {
throw new \RuntimeException(sprintf('Unable to create directory: %s', $this->htmlOutputDirectory));
}
if (!file_exists($this->htmlOutputDirectory . '/.htaccess')) {