Merge pull request #1113 from eimanavicius/master

Fixes #1112 protected method call
This commit is contained in:
Damian Mooyman 2014-10-08 08:45:25 +13:00
commit dd98317b67

View File

@ -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','/'));
} }