Commit 5f9c8fde authored by catch's avatar catch
Browse files

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

parent f6e7a9c6
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment