Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix notice when ErrorPage tries to create static error pages and can'…

…t write
  • Loading branch information...
commit c019f22163816a47cfbee6d8320ed762c1df9a9b 1 parent 2923e55
Sean Harvey halkyon authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  code/model/ErrorPage.php
2  code/model/ErrorPage.php
View
@@ -88,6 +88,7 @@ function requireDefaultRecords() {
// Ensure a static error page is created from latest error page content
$response = Director::test(Director::makeRelative($pageNotFoundErrorPage->Link()));
+ $written = null;
if($fh = fopen($pageNotFoundErrorPagePath, 'w')) {
$written = fwrite($fh, $response->getBody());
fclose($fh);
@@ -115,6 +116,7 @@ function requireDefaultRecords() {
// Ensure a static error page is created from latest error page content
$response = Director::test(Director::makeRelative($serverErrorPage->Link()));
+ $written = null;
if($fh = fopen($serverErrorPagePath, 'w')) {
$written = fwrite($fh, $response->getBody());
fclose($fh);
Please sign in to comment.
Something went wrong with that request. Please try again.