Merge pull request #156 from silverstripe-big-o/staticPublishingFix

BUGFIX: fixing an edge-case bug where a 404-page would get statically pu...
This commit is contained in:
Ingo Schommer 2012-07-09 01:09:49 -07:00
commit 8dc2770ce1

View File

@ -191,10 +191,11 @@ class FilesystemPublisher extends StaticPublisher {
Requirements::clear(); Requirements::clear();
singleton('DataObject')->flushCache(); 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 // Generate file content
// PHP file caching will generate a simple script from a template // PHP file caching will generate a simple script from a template
if($this->fileExtension == 'php') { if($this->fileExtension == 'php') {