diff --git a/src/Http/Parser/Accept.php b/src/Http/Parser/Accept.php index c8bf246..d150df7 100644 --- a/src/Http/Parser/Accept.php +++ b/src/Http/Parser/Accept.php @@ -67,7 +67,7 @@ public function parse(Request $request, $strict = false) { $pattern = '/application\/'.$this->standardsTree.'\.('.$this->subtype.')\.([\w\d\.\-]+)\+([\w]+)/'; - if (! preg_match($pattern, $request->header('accept'), $matches)) { + if (! preg_match($pattern, $request->header('accept', ''), $matches)) { if ($strict) { throw new BadRequestHttpException('Accept header could not be properly parsed because of a strict matching process.'); }