Skip to content

Bug: prototype of setBody($data); method in CodeIgniter\HTTP\Message should be changed to setBody(string $data); #2466

Closed
@SunilEver

Description

@SunilEver

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions