mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
FIX: Fix VirtualPage::init() content-modification check.
This check had never worked but PHP 5 silently ignored it and PHP 7 raised it as an error.
This commit is contained in:
parent
322c6f578b
commit
80e8967308
@ -528,8 +528,8 @@ class VirtualPage_Controller extends Page_Controller {
|
||||
* We can't load the content without an ID or record to copy it from.
|
||||
*/
|
||||
public function init(){
|
||||
if(isset($this->record) && $this->record->ID){
|
||||
if($this->record->VersionID != $this->failover->CopyContentFrom()->Version){
|
||||
if(isset($this->record) && $this->record['ID']){
|
||||
if($this->record['VersionID'] != $this->failover->CopyContentFrom()->Version){
|
||||
$this->reloadContent();
|
||||
$this->VersionID = $this->failover->CopyContentFrom()->VersionID;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user