- Issue created by @ctodon
[warning] Trying to access array offset on value of type bool LikeDislikePermissions.php:122
[error] Adding non-existent permissions to a role is not allowed. The incorrect permissions are "view update notifications".
i create this patch
--- a/src/LikeDislikePermissions.php
+++ b/src/LikeDislikePermissions.php
@@ -120,7 +120,7 @@
foreach ($bundles as $bundle) {
// Corrección para evitar el acceso a un valor booleano en lugar de array.
$bundle_info = $this->bundleInfoService->getBundleInfo($entity_type_id);
- $bundle_info = $bundle_info[$bundle];
+ $bundle_info = (is_array($bundle_info) && isset($bundle_info[$bundle])) ? $bundle_info[$bundle] : [];
/** @var \Drupal\votingapi\VoteTypeInterface $vote_type */
foreach ($vote_types as $vote_type) {
Active
Code