- Issue created by @luke.leber
- Merge request !4Ensure that a string is always passed into the strpos function. β (Merged) created by luke.leber
- πΊπΈUnited States luke.leber Pennsylvania
Unassigned + sent to NR status
If a cookie condition is set up and a visitor does not have a cookie set, site owners will see a deprecated function notice:
Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\cookie_condition\Plugin\Condition\Cookie->evaluate() (line 146 of modules/contrib/cookie_condition/src/Plugin/Condition/Cookie.php).
This seems to be happening because \Symfony\Component\HttpFoundation\InputBag::get
will return NULL
by default if the bag doesn't contain the requested item.
Pass an empty string in for the $default
argument on line 146.
- return strpos($cookies->get($cookie_name), $cookie_value) !== false;
+ return strpos($cookies->get($cookie_name, ''), $cookie_value) !== false;
None
None
None
Active
2.0
Code
Unassigned + sent to NR status