Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #523 from amcsi/patch-1
Browse files Browse the repository at this point in the history
Fix deprecated null potentially being passed to strpos()
  • Loading branch information
Arkanius authored Mar 13, 2023
2 parents 711d7f6 + 7e60b15 commit 8e01730
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Transformers/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function createIlluminateRequest($get, $post, $cookie, $files, $server

$request = new SymfonyRequest($get, $post, [], $cookie, $files, $server, $content);

if (0 === strpos($request->headers->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded')
if (0 === strpos($request->headers->get('CONTENT_TYPE', ''), 'application/x-www-form-urlencoded')
&& in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), ['PUT', 'DELETE', 'PATCH'])
) {
parse_str($request->getContent(), $data);
Expand Down

0 comments on commit 8e01730

Please sign in to comment.