You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 70424f9
Browse filesBrowse the repository at this point in the historyBrowse files
$logger->warning('Using list format for CSP directives is deprecated and will be removed in future versions. Please use key-value pairs with boolean values instead.');
50
-
} elseif($keyType === 'string') {
51
-
// new configuration format using key-value pairs
52
-
if($valueType === 'boolean') {
53
-
if($value === true && !empty($key)) {
54
-
$normalizedValues[] = $key;
55
-
}
56
-
} else {
57
-
// We chose a format similar to NodeType constraints yaml configuration.
58
-
thrownewDirectivesNormalizerException('When using keys in your yaml, the values must be boolean.');
49
+
if (is_int($key) && is_string($value) && trim($value) !== '') {
50
+
// old configuration format using list
51
+
$normalizedValues[] = $value;
52
+
$logger->warning(
53
+
'Using list format for CSP directives is deprecated and will be removed in future versions. Please use key-value pairs with boolean values instead.'
54
+
);
55
+
} elseif (is_string($key)) {
56
+
// new configuration format using key-value pairs
57
+
if (is_bool($value)) {
58
+
if ($value === true && trim($key) !== '') {
59
+
$normalizedValues[] = $key;
59
60
}
61
+
continue;
60
62
}
63
+
64
+
// We chose a format similar to NodeType constraints yaml configuration.
65
+
thrownewDirectivesNormalizerException(
66
+
'When using keys in your yaml, the values must be boolean.'
0 commit comments