- Issue created by @Remco Hoeneveld
- 🇳🇱Netherlands Remco Hoeneveld
Above is a simple solution to fix the errors in the logs.
Deprecated function: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in Drupal\csp\Csp::Drupal\csp\{closure}() (line 507 of modules/contrib/csp/src/Csp.php). - 🇨🇦Canada gapple
Do you have a custom module altering the policy values, or is this reproducible by just configuring the CSP module?
Null values are not expected to be passed to
setDirectiveorappendDirective, and are likely to cause type errors or assertion failures on CSP 2.x, so should be addressed in any code calling those methods to avoid issues when upgrading. - 🇳🇱Netherlands Remco Hoeneveld
Thank for the reply, ill check thanks for the explanation!
- Status changed to Closed: cannot reproduce
6 months ago 12:13am 27 May 2025 - 🇨🇦Canada gapple
Please reopen the issue if you have a test case that's still reproducible on CSP 2.x.