Issue #1885796 by sun: Fixed PHP warnings in PhpStorage\FileStorage::save().
parent
f6e7a9c66e
commit
5f9c8fdec4
|
@ -53,7 +53,10 @@ class FileStorage implements PhpStorageInterface {
|
|||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue