mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed ContentController where ->dataRecord is empty
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2.2@52712 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b3128b280f
commit
6edc1b6f99
@ -93,7 +93,9 @@ class ContentController extends Controller {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->dataRecord->extend('contentcontrollerInit', $this);
|
||||
if($this->dataRecord) $this->dataRecord->extend('contentcontrollerInit', $this);
|
||||
else singleton('SiteTree')->extend('contentcontrollerInit', $this);
|
||||
|
||||
if(Director::redirected_to()) return;
|
||||
|
||||
Director::set_site_mode('site');
|
||||
|
Loading…
Reference in New Issue
Block a user