We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c95c92 commit a5b901dCopy full SHA for a5b901d
src/Http/Parser/Accept.php
@@ -67,7 +67,7 @@ public function parse(Request $request, $strict = false)
67
{
68
$pattern = '/application\/'.$this->standardsTree.'\.('.$this->subtype.')\.([\w\d\.\-]+)\+([\w]+)/';
69
70
- if (! preg_match($pattern, $request->header('accept'), $matches)) {
+ if (! preg_match($pattern, $request->header('accept', ''), $matches)) {
71
if ($strict) {
72
throw new BadRequestHttpException('Accept header could not be properly parsed because of a strict matching process.');
73
}
0 commit comments