Skip to content

Commit a5b901d

Browse files
authored
Update Accept.php (#40)
Fixes: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
1 parent 5c95c92 commit a5b901d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Parser/Accept.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function parse(Request $request, $strict = false)
6767
{
6868
$pattern = '/application\/'.$this->standardsTree.'\.('.$this->subtype.')\.([\w\d\.\-]+)\+([\w]+)/';
6969

70-
if (! preg_match($pattern, $request->header('accept'), $matches)) {
70+
if (! preg_match($pattern, $request->header('accept', ''), $matches)) {
7171
if ($strict) {
7272
throw new BadRequestHttpException('Accept header could not be properly parsed because of a strict matching process.');
7373
}

0 commit comments

Comments
 (0)