Closed
Description
Describe the bug
prototype of setBody($data);
method in CodeIgniter\HTTP\Message
should be changed to setBody(string $data);
as when calling IncomingRequest::getJson()
the method finds something other string and tries to json decode it.
CodeIgniter 4 version
v4.0.0-rc.3
Affected module(s)
All request modules.
Expected behavior, and steps to reproduce if appropriate
CodeIgniter\HTTP\Message::setBody should throw an error if anything other than string
is passed.
Context
- OS: Ubuntu 16
- Web server php native server
- PHP version 7.3.13
Activity