Skip to content
Permalink
Browse files

FIX: Fixes CMS errors when viewing history on "Deleted" pages.

Fixes undocumented error when viewing history tab of deleted pages with no history.
Related to silverstripe/silverstripe/cms#1054 (See
silverstripe/silverstripe-cms/pull/1149).
  • Loading branch information...
Russell Michell
Russell Michell committed Jan 8, 2015
1 parent 146b468 commit adf0f102cc7a04cf8fcac8743801d48214118cad
Showing with 4 additions and 1 deletion.
  1. +4 −1 model/Versioned.php
@@ -1249,8 +1249,11 @@ public static function get_latest_version($class, $id) {
*/
public function isLatestVersion() {
$version = self::get_latest_version($this->owner->class, $this->owner->ID);
if($version) {
return ($version->Version == $this->owner->Version);
}
return ($version->Version == $this->owner->Version);
return false;
}
/**

0 comments on commit adf0f10

Please sign in to comment.
You can’t perform that action at this time.