- Issue created by @minirobot
- Merge request !86493458785: Add extra !empty() check to getAttachedDisplays. β (Open) created by minirobot
If we have a view with multiple displays for example:
Display 1
Display 2
Feed 1 (attached to display 1)
Feed 2 (attached to display 2)
The method getAttachedDisplays() when called on the display handler for Display 1 will return [Feed 1, Feed 2] instead of the expected [Feed 1].
// Go through all displays and search displays which link to this one.
foreach ($this->view->storage->get('display') as $display_id => $display) {
if (isset($display['display_options']['displays'])) {
$displays = $display['display_options']['displays'];
if (isset($displays[$current_display_id])) {
$attached_displays[] = $display_id;
}
}
}
if (isset($displays[$current_display_id]))
needs an extra check for !empty($displays[$current_display_id])
because for the feed displays, the value $displays[$current_display_id]
is set but is 0 if the feed is not attached.
Active
11.0 π₯
Last updated