mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02: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.
|
* We can't load the content without an ID or record to copy it from.
|
||||||
*/
|
*/
|
||||||
public function init(){
|
public function init(){
|
||||||
if(isset($this->record) && $this->record->ID){
|
if(isset($this->record) && $this->record['ID']){
|
||||||
if($this->record->VersionID != $this->failover->CopyContentFrom()->Version){
|
if($this->record['VersionID'] != $this->failover->CopyContentFrom()->Version){
|
||||||
$this->reloadContent();
|
$this->reloadContent();
|
||||||
$this->VersionID = $this->failover->CopyContentFrom()->VersionID;
|
$this->VersionID = $this->failover->CopyContentFrom()->VersionID;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user