BUGFIX: fixing an edge-case bug where a 404-page would get statically published and overwrite the homepage of the site (this would sometimes happen when a RedirectorPage was set to an external URL and still referenced an internal page ID)

This commit is contained in:
Julian Seidenberg 2012-07-09 13:20:58 +12:00
parent d1bc7219a8
commit 63ad68a7d3

View File

@ -191,10 +191,11 @@ class FilesystemPublisher extends StaticPublisher {
Requirements::clear();
singleton('DataObject')->flushCache();
//skip any responses with a 404 status code. We don't want to turn those into statically cached pages
if (!$response || $response->getStatusCode() == '404') continue;
// Generate file content
// PHP file caching will generate a simple script from a template
if($this->fileExtension == 'php') {