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
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

CommentFileSizeAuthor
#2 super-global-3296153-2.patch1.35 KBHarsh panchal

Comments

Harsh panchal created an issue. See original summary.

Harsh panchal’s picture

Category: Task » Bug report
Status: Active » Needs review
StatusFileSize
new1.35 KB

I have fixed this issue and providing a patch.

irodriguez’s picture

#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)

irodriguez’s picture

I found the right way to fix this issue. I was unable to use your patch

irodriguez’s picture

Status: Needs review » Fixed
irodriguez’s picture

Status: Fixed » Closed (fixed)