diff --git a/core/modules/rest/rest.module b/core/modules/rest/rest.module index 5e2cf86..4f2c24d 100644 --- a/core/modules/rest/rest.module +++ b/core/modules/rest/rest.module @@ -39,5 +39,9 @@ function rest_help($path, $arg) { * Implements hook_entity_info_alter(). */ function rest_entity_info_alter(&$entity_info) { - $entity_info['file']['controllers']['access'] = 'Drupal\rest\FileAccessController'; + if (isset($entity_info['file'])) { + $controllers = $entity_info['file']->get('controllers'); + $controllers['access'] = 'Drupal\\rest\\FileAccessController'; + $entity_info['file']->set('controllers', $controllers); + } }