- 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
setDirective
orappendDirective
, 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!