mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00: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') {
|
||||
$conn = DB::get_schema();
|
||||
// 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->run(new SS_HTTPRequest('GET','/'));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user