Categories
Technical

Notice: Only variables should be passed by reference RateLimitService.php -> $stmt->bindParam(‘request’)

BUG

request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorException: “Notice: Only variables should be passed by reference” at vendor/davidBundle/api-bundle/davidBundle/ApiBundle/Services/RateLimitService.php line 56 {“exception”:”[object] (Symfony\\Component\\Debug\\Exception\\ContextErrorException(code: 0): Notice: Only variables should be passed by reference at /master/davidBundle/vendor/fourover/api-bundle/FourOver/ApiBundle/Services/RateLimitService.php:56)”} []

switch from

$stmt->bindParam(‘request’, $this->toRaw());

to

$stmt->bindValue(‘request’, $this->toRaw());

Leave a Reply