Create directory if it is missing

This commit is contained in:
grandeljay 2022-06-09 08:12:10 +02:00
parent ddee1931ce
commit 165de29793

View file

@ -139,7 +139,13 @@ class EmbedCache
} }
if ($generateCache) { if ($generateCache) {
file_put_contents($this->getFilepath(), json_encode($info)); $directory = dirname($filepath);
if (false === file_exists($directory)) {
mkdir($directory);
}
file_put_contents($filepath, json_encode($info));
} }
} }