Checking if there is a version to avoid #11.

This commit is contained in:
Peter Thaleikis 2015-07-23 22:56:26 +12:00
parent fc530d601b
commit 429b61036e
1 changed files with 4 additions and 1 deletions

View File

@ -48,7 +48,10 @@ class VersionFeed_Controller extends Extension {
*/
public function changes() {
// Check viewability of changes
if(!Config::inst()->get('VersionFeed', 'changes_enabled') || !$this->owner->PublicHistory) {
if(!Config::inst()->get('VersionFeed', 'changes_enabled')
|| !$this->owner->PublicHistory
|| $this->owner->Version == ''
) {
return $this->owner->httpError(404, 'Page history not viewable');
}