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

Commit

Permalink
Fix deprecated null potentially being passed to strpos()
Browse files Browse the repository at this point in the history
  • Loading branch information
amcsi committed Apr 4, 2022
1 parent db810ce commit 7e60b15
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 7e60b15

Please sign in to comment.