Skip to content
Snippets Groups Projects
Commit 5f9c8fde authored by catch's avatar catch
Browse files

Issue #1885796 by sun: Fixed PHP warnings in PhpStorage\FileStorage::save().

parent f6e7a9c6
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -53,7 +53,10 @@ public function load($name) {
*/
public function save($name, $code) {
$path = $this->getFullPath($name);
mkdir(dirname($path), 0700, TRUE);
$dir = dirname($path);
if (!file_exists($dir)) {
mkdir($dir, 0700, TRUE);
}
return (bool) file_put_contents($path, $code);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment