mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT Added nicer (and more useful) error message if ErrorPage cannot open the error HTML file for writing
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@70190 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ec5ed83512
commit
ebd5087b31
@ -113,6 +113,17 @@ class ErrorPage extends Page {
|
||||
if($fh) {
|
||||
fwrite($fh, $errorContent);
|
||||
fclose($fh);
|
||||
} else {
|
||||
$fileErrorText = sprintf(
|
||||
_t(
|
||||
"ErrorPage.ERRORFILEPROBLEM",
|
||||
"Error opening file \"%s\" for writing. Please check file permissions."
|
||||
),
|
||||
$errorFile
|
||||
);
|
||||
FormResponse::status_message($fileErrorText, 'bad');
|
||||
FormResponse::respond();
|
||||
return;
|
||||
}
|
||||
|
||||
// Restore the version we're currently connected to.
|
||||
|
Loading…
Reference in New Issue
Block a user