mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Fix notice when ErrorPage tries to create static error pages and can't write
This commit is contained in:
parent
2923e55c71
commit
c019f22163
@ -88,6 +88,7 @@ class ErrorPage extends Page {
|
|||||||
|
|
||||||
// Ensure a static error page is created from latest error page content
|
// Ensure a static error page is created from latest error page content
|
||||||
$response = Director::test(Director::makeRelative($pageNotFoundErrorPage->Link()));
|
$response = Director::test(Director::makeRelative($pageNotFoundErrorPage->Link()));
|
||||||
|
$written = null;
|
||||||
if($fh = fopen($pageNotFoundErrorPagePath, 'w')) {
|
if($fh = fopen($pageNotFoundErrorPagePath, 'w')) {
|
||||||
$written = fwrite($fh, $response->getBody());
|
$written = fwrite($fh, $response->getBody());
|
||||||
fclose($fh);
|
fclose($fh);
|
||||||
@ -115,6 +116,7 @@ class ErrorPage extends Page {
|
|||||||
|
|
||||||
// Ensure a static error page is created from latest error page content
|
// Ensure a static error page is created from latest error page content
|
||||||
$response = Director::test(Director::makeRelative($serverErrorPage->Link()));
|
$response = Director::test(Director::makeRelative($serverErrorPage->Link()));
|
||||||
|
$written = null;
|
||||||
if($fh = fopen($serverErrorPagePath, 'w')) {
|
if($fh = fopen($serverErrorPagePath, 'w')) {
|
||||||
$written = fwrite($fh, $response->getBody());
|
$written = fwrite($fh, $response->getBody());
|
||||||
fclose($fh);
|
fclose($fh);
|
||||||
|
Loading…
Reference in New Issue
Block a user