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

Fix deprecated null potentially being passed to strpos() #523

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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