- Issue created by @Anybody
- 🇩🇪Germany Anybody Porta Westfalica
Okay looks like this isn't just the case for empty paragraphs. It seems like a logical bug, maybe regression.
In these lines:
$target_bundles = array_keys($handler["target_bundles"]); if (!empty($handler['negate'])) { $bundles = $this->entityTypeBundleInfo->getBundleInfo('paragraph'); $target_bundles = array_keys(array_diff_key($bundles, $handler['target_bundles'])); } $type = key($target_bundles);
array_keys() already returns the keys as array values. So we need to get the value to get the type machine name:
$type = reset($target_bundles);
Otherwise,
$type
is the numeric key ($type=0
) and the following lines break.The MR fixes that, please review.
- 🇩🇪Germany Anybody Porta Westfalica
Seems this was once again merged without credit from the maintainer.