- Issue created by @gapple
- Status changed to Fixed
8 months ago 10:21am 2 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.
If getDirective
is called on a directive that has not had a value set, it will result in a type error due to the method return type:
TypeError: Drupal\csp\Csp::getDirective(): Return value must be of type array|bool, null returned
Return a default value for unset directives.
hasDirective()
is available to determine if a directive was not initialized or has an empty/default value.
Fixed
2.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.