FILE: D:\xampp\htdocs\drupal9.5\web\modules\contrib\five_star_rating\src\Controller\RatingController.php
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
34 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('uid') instead
35 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('nid') instead
36 | ERROR | The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('rating') instead
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | super-global-3296153-2.patch | 1.35 KB | Harsh panchal |
Comments
Comment #2
Harsh panchal commentedI have fixed this issue and providing a patch.
Comment #3
irodriguez commented#2 patch does not appear to work for me. I receive the following error.
ArgumentCountError: Too few arguments to function Drupal\rating\Controller\RatingController::__construct(), 0 passed in /projects.site/site/web/core/lib/Drupal/Core/Controller/ControllerBase.php on line 109 and exactly 1 expected in Drupal\rating\Controller\RatingController->__construct() (line 27 of /projects.site/site/web/modules/contrib/five_star_rating/src/Controller/RatingController.php)
Comment #4
irodriguez commentedI found the right way to fix this issue. I was unable to use your patch
Comment #5
irodriguez commentedComment #6
irodriguez commented