Merge pull request #578 from torrentpier/bugfix/create-cache-file-for-template

Fixed checking exists a file to create a cache
This commit is contained in:
Roman Kelesidis 2023-03-09 16:31:31 +07:00 committed by GitHub
commit 7d9f1a968e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -253,7 +253,7 @@ function file_write($str, $file, $max_size = LOG_MAX_SIZE, $lock = true, $replac
rename($file, $new_name);
}
}
if (file_exists($file) && $dir_created = bb_mkdir(dirname($file))) {
if (!file_exists($file) && $dir_created = bb_mkdir(dirname($file))) {
$fp = fopen($file, 'ab+');
}
if (isset($fp)) {