diff --git a/CHANGELOG-1.5.md b/CHANGELOG-1.5.md index c605ea6fc3..f715ba363d 100644 --- a/CHANGELOG-1.5.md +++ b/CHANGELOG-1.5.md @@ -10,6 +10,7 @@ CHANGELOG - ZIKULA 1.5.x - Disabled CSRF protection for search results (#3831). - Allowing audio files with the .mp3 and .wav extensions to be accessible via the modules and themes folders. (#3858). - Fixed logical issue in Users module's mass mailing helper (#3863). + - Fixed potential problems with invalid hook bundles (#3866). - Vendor updates: - composer/ca-bundle updated from 1.0.8 to 1.1.0 diff --git a/src/lib/Zikula/Bundle/HookBundle/Controller/HookController.php b/src/lib/Zikula/Bundle/HookBundle/Controller/HookController.php index f61aa892c5..2f8d898b59 100644 --- a/src/lib/Zikula/Bundle/HookBundle/Controller/HookController.php +++ b/src/lib/Zikula/Bundle/HookBundle/Controller/HookController.php @@ -162,6 +162,9 @@ public function editAction($moduleName) $category = $nonPersistedSubscribers[$hooksubscriberArea]->getCategory(); } else { // @deprecated + if (null === $hooksubscriberVersionObj) { + continue; + } $hooksubscriberAreasToTitles[$hooksubscriberArea] = $this->get('translator.default')->__(/** @Ignore */ $hooksubscriberVersionObj->getHookSubscriberBundle($hooksubscriberArea)->getTitle()); $category = $this->get('translator.default')->__(/** @Ignore */ @@ -270,6 +273,9 @@ public function editAction($moduleName) $category = $nonPersistedProviders[$hookproviderArea]->getCategory(); } else { // @deprecated + if (null === $hookproviderVersionObj) { + continue; + } $providerBundle = $hookproviderVersionObj->getHookProviderBundle($hookproviderArea); $hookproviderAreasToTitles[$hookproviderArea] = $this->get('translator.default')->__(/** @Ignore */$providerBundle->getTitle()); $category = $this->get('translator.default')->__(/** @Ignore */$providerBundle->getCategory()); diff --git a/src/lib/Zikula/Bundle/HookBundle/Resources/views/Hook/provider.html.twig b/src/lib/Zikula/Bundle/HookBundle/Resources/views/Hook/provider.html.twig index 7111fa4da1..f983c31077 100644 --- a/src/lib/Zikula/Bundle/HookBundle/Resources/views/Hook/provider.html.twig +++ b/src/lib/Zikula/Bundle/HookBundle/Resources/views/Hook/provider.html.twig @@ -51,7 +51,7 @@ {% if total_bindings > 0 %}
- {{ subscriber.areasToTitles[sarea] }} ({{ sarea }}) + {{ subscriber.areasToTitles[sarea]|default('Area') }} ({{ sarea }})
diff --git a/src/lib/Zikula/Bundle/HookBundle/Resources/views/Hook/subscriber.html.twig b/src/lib/Zikula/Bundle/HookBundle/Resources/views/Hook/subscriber.html.twig index 993e4e83df..081773b17a 100644 --- a/src/lib/Zikula/Bundle/HookBundle/Resources/views/Hook/subscriber.html.twig +++ b/src/lib/Zikula/Bundle/HookBundle/Resources/views/Hook/subscriber.html.twig @@ -61,7 +61,7 @@
  • - {{ hookprovider.areasToTitles[parea] }} ({{ parea }}) + {{ hookprovider.areasToTitles[parea]|default('Area') }} ({{ parea }})