Skip to content
Snippets Groups Projects
Commit c6b32f8b authored by Carlos Rincon Sanchez's avatar Carlos Rincon Sanchez Committed by Gaus Surahman
Browse files

Issue #3349558 by Carlitus: Trying to access array offset on value of type...

Issue #3349558 by Carlitus: Trying to access array offset on value of type null in Drupal\blazy\Field\BlazyEntityVanillaBase->getAvailableBundles()
parent e58b5289
No related branches found
No related tags found
No related merge requests found
Blazy 8.x-2.0-dev, 2023-05-15
------------------------------
- Issue #3349558 by Carlitus: Trying to access array offset on value of type
null in Drupal\blazy\Field\BlazyEntityVanillaBase->getAvailableBundles().
- Added supports for Views `group_rows` when Blazy is embedded by sub-modules.
- Fixed for `use_theme_field` alter.
- Fixed for few strict contracts.
......
......@@ -95,8 +95,9 @@ abstract class BlazyEntityVanillaBase extends EntityReferenceFormatterBase {
protected function getAvailableBundles(): array {
$target_type = $this->getFieldSetting('target_type');
$views_ui = $this->getFieldSetting('handler') == 'default';
$bundles = $views_ui
? [] : $this->getFieldSetting('handler_settings')['target_bundles'];
$handlers = $this->getFieldSetting('handler_settings');
$targets = $handlers ? $handlers['target_bundles'] : [];
$bundles = $views_ui ? [] : $targets;
// Fix for Views UI not recognizing Media bundles, unlike Formatters.
if (empty($bundles)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment