mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-06-29 16:09:40 +02:00
Fixes #1112
Fixes #1112 $conn->fieldList('SiteTree') has protected access but is called from SiteTree
This commit is contained in:
parent
b838f8161f
commit
7f3563cd72
|
@ -1509,7 +1509,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||||
if($this->class == 'SiteTree') {
|
if($this->class == 'SiteTree') {
|
||||||
$conn = DB::get_schema();
|
$conn = DB::get_schema();
|
||||||
// only execute command if fields haven't been renamed to _obsolete_<fieldname> already by the task
|
// only execute command if fields haven't been renamed to _obsolete_<fieldname> already by the task
|
||||||
if(array_key_exists('Viewers', $conn->fieldList('SiteTree'))) {
|
if($conn->hasField('SiteTree' ,'Viewers')) {
|
||||||
$task = new UpgradeSiteTreePermissionSchemaTask();
|
$task = new UpgradeSiteTreePermissionSchemaTask();
|
||||||
$task->run(new SS_HTTPRequest('GET','/'));
|
$task->run(new SS_HTTPRequest('GET','/'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user