diff --git a/core/lib/Drupal/Component/PhpStorage/FileStorage.php b/core/lib/Drupal/Component/PhpStorage/FileStorage.php index a0efc92eff..cdeebec856 100644 --- a/core/lib/Drupal/Component/PhpStorage/FileStorage.php +++ b/core/lib/Drupal/Component/PhpStorage/FileStorage.php @@ -154,12 +154,11 @@ protected function createDirectory($directory, $mode = 0777) { $parent_exists = $this->createDirectory($parent, $mode); } - // If parent exists, carry on. + // If parent exists, try to create the directory and ensure to set its + // permissions, because mkdir() obeys the umask of the current process. if ($parent_exists) { - // Otherwise, try to create the directory and ensure to set its permissions, - // because mkdir() obeys the umask of the current process. // We hide warnings and ignore the return because there may have been a - // race getting here and could fail because the directory already exists. + // race getting here and the directory could already exists. @mkdir($directory); // Only try to chmod() if the subdirectory could be created. if (is_dir($directory)) {