Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 62009a6

Browse files
coreshmichalbundyra
authored andcommitted
Fix exception notice "Undefined offset: 1"
1 parent 9476ebd commit 62009a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Header/ContentSecurityPolicy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public static function fromString($headerLine)
133133
foreach ($tokens as $token) {
134134
$token = trim($token);
135135
if ($token) {
136-
list($directiveName, $directiveValue) = explode(' ', $token, 2);
136+
list($directiveName, $directiveValue) = array_pad(explode(' ', $token, 2), 2, null);
137137
if (! isset($header->directives[$directiveName])) {
138138
$header->setDirective($directiveName, [$directiveValue]);
139139
}

0 commit comments

Comments
 (0)