From 1ffbb8ebd7344f57e1b5042dcc3ea85e36f1d004 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Sat, 18 May 2019 10:51:53 +0200 Subject: [PATCH] Issue #3040166 follow-up by Lendude: mkdir() fails in BrowserHtmlDebugTrait.php:141 because of a race condition --- core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php b/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php index 7624464e309..bb9bfaff494 100644 --- a/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php +++ b/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php @@ -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')) {