diff --git a/core/model/ErrorPage.php b/core/model/ErrorPage.php index 010d806ea..893680ba5 100755 --- a/core/model/ErrorPage.php +++ b/core/model/ErrorPage.php @@ -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.