dpi / rng

RNG is a Drupal module enabling people to register for events.
https://www.drupal.org/project/rng
GNU General Public License v2.0
15 stars 23 forks source link

Error on Access Rules Event page. #191

Open uttkarsh-26 opened 5 years ago

uttkarsh-26 commented 5 years ago

@dpi Fatal error: Declaration of Drupal\rng\Plugin\Menu\LocalAction\ResetAccessRules::getTitle() must be compatible with Drupal\Core\Menu\LocalActionDefault::getTitle(?Symfony\Component\HttpFoundation\Request $request = NULL) in /var/www/html/web/modules/contrib/rng/src/Plugin/Menu/LocalAction/ResetAccessRules.php on line 15 Here is a patch for it.

diff --git a/src/Plugin/Menu/LocalAction/ResetAccessRules.php b/src/Plugin/Menu/LocalAction/ResetAccessRules.php
index 4a67235..28c6bc4 100644
--- a/src/Plugin/Menu/LocalAction/ResetAccessRules.php
+++ b/src/Plugin/Menu/LocalAction/ResetAccessRules.php
@@ -8,6 +8,7 @@ use Drupal\rng\EventManagerInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Drupal\Core\StringTranslation\StringTranslationTrait;
+use Symfony\Component\HttpFoundation\Request;

 /**
  * Modifies the reset access rules action.
@@ -70,7 +71,7 @@ class ResetAccessRules extends LocalActionDefault {
   /**
    * {@inheritdoc}
    */
-  public function getTitle() {
+  public function getTitle(Request $request = NULL) {
     $route = $this->routeProvider->getRouteByName($this->getRouteName());
     $param = $route->getDefault('event');
uttkarsh-26 commented 5 years ago

Don't have access to create PR otherwise would have done it.

uttkarsh-26 commented 5 years ago

192

brandonratz commented 5 years ago

Patch solve the issue for me.