Permalink
Browse files

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

…t write
  • Loading branch information...
1 parent 2923e55 commit c019f22163816a47cfbee6d8320ed762c1df9a9b @halkyon halkyon committed Aug 20, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 code/model/ErrorPage.php
@@ -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);

0 comments on commit c019f22

Please sign in to comment.