Commit 8fd6225e authored by alexpott's avatar alexpott

Issue #2282477 by tim.plunkett: Fixed ViewListBuilder::getDisplaysList() does...

Issue #2282477 by tim.plunkett: Fixed ViewListBuilder::getDisplaysList() does not handle empty admin strings.
parent c723131b
......@@ -229,7 +229,7 @@ protected function getDisplaysList(EntityInterface $view) {
$displays = array();
foreach ($view->get('display') as $display) {
$definition = $this->displayManager->getDefinition($display['display_plugin']);
if (isset($definition['admin'])) {
if (!empty($definition['admin'])) {
// Cast the admin label to a string since it is an object.
// @see \Drupal\Core\StringTranslation\TranslationWrapper
$displays[] = (string) $definition['admin'];
......
......@@ -54,6 +54,7 @@ public function testBuildRowEntityList() {
'title' => 'Master',
'theme' => 'views_view',
'no_ui' => TRUE,
'admin' => '',
)
),
array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment