Skip to content

Commit

Permalink
BUGFIX: fixing an edge-case bug where a 404-page would get statically…
Browse files Browse the repository at this point in the history
… 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)
  • Loading branch information
Julian Seidenberg committed Jul 9, 2012
1 parent d1bc721 commit 63ad68a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/staticpublisher/FilesystemPublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,11 @@ function publishPages($urls) {

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') {
Expand Down

0 comments on commit 63ad68a

Please sign in to comment.