mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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).
This commit is contained in:
parent
146b4689b8
commit
adf0f102cc
@ -1249,8 +1249,11 @@ class Versioned extends DataExtension implements TemplateGlobalProvider {
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user