From f807c9f8ca0ff69cc8b8d335c25a258ed3ba5fe5 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Sun, 28 Oct 2007 08:14:49 +0000 Subject: [PATCH] #1408 - Create assets folder if it's not there on ErrorPage publish git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43897 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/ErrorPage.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/model/ErrorPage.php b/core/model/ErrorPage.php index a91479cda..7b78cacd1 100755 --- a/core/model/ErrorPage.php +++ b/core/model/ErrorPage.php @@ -81,6 +81,10 @@ class ErrorPage extends Page { Requirements::clear(); $controller = new ErrorPage_Controller($this); $errorContent = $controller->run( array() )->getBody(); + + if(!file_exists("../assets")) { + mkdir("../assets", 02775); + } if($fh = fopen("../assets/error-$this->ErrorCode.html", "w")) { fwrite($fh, $errorContent);