If the application receives a request where the Accepts header is not set/null/'', the following warning is output
monolog.WARNING: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /app/vendor/api-ecosystem-for-laravel/dingo-api/src/Http/Parser/Accept.php on line 70 [] []
Expected Behaviour
A not set/null/'' Accepts header does not cause a warning
Steps to Reproduce
Clean application, a new route defined with dingo, make a request to that route with no Accepts header
Possible Solutions
On the line in question, default to '' or */* if the header is not set/null/''
Actual Behaviour
If the application receives a request where the Accepts header is not set/
null
/''
, the following warning is outputExpected Behaviour
A not set/
null
/''
Accepts header does not cause a warningSteps to Reproduce
Clean application, a new route defined with dingo, make a request to that route with no Accepts header
Possible Solutions
On the line in question, default to
''
or*/*
if the header is not set/null
/''