mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-03 06:38:51 +02:00
BUG If combined files can't be written, fallback instantly to uncombined
This commit is contained in:
parent
d0153f32cf
commit
954eb60983
@ -998,15 +998,16 @@ class Requirements_Backend {
|
|||||||
Filesystem::makeFolder(dirname($combinedFilePath));
|
Filesystem::makeFolder(dirname($combinedFilePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the file isn't writebale, don't even bother trying to make the combined file
|
// If the file isn't writeable, don't even bother trying to make the combined file and return (falls back to uncombined)
|
||||||
// Complex test because is_writable fails if the file doesn't exist yet.
|
// Complex test because is_writable fails if the file doesn't exist yet.
|
||||||
if((file_exists($combinedFilePath) && !is_writable($combinedFilePath)) ||
|
if((file_exists($combinedFilePath) && !is_writable($combinedFilePath))
|
||||||
(!file_exists($combinedFilePath) && !is_writable(dirname($combinedFilePath)))) {
|
|| (!file_exists($combinedFilePath) && !is_writable(dirname($combinedFilePath)))
|
||||||
|
) {
|
||||||
user_error("Requirements_Backend::process_combined_files(): Couldn't create '$combinedFilePath'", E_USER_WARNING);
|
user_error("Requirements_Backend::process_combined_files(): Couldn't create '$combinedFilePath'", E_USER_WARNING);
|
||||||
continue;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine if we need to build the combined include
|
// Determine if we need to build the combined include
|
||||||
if(file_exists($combinedFilePath) && !isset($_GET['flush'])) {
|
if(file_exists($combinedFilePath) && !isset($_GET['flush'])) {
|
||||||
// file exists, check modification date of every contained file
|
// file exists, check modification date of every contained file
|
||||||
$srcLastMod = 0;
|
$srcLastMod = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user