Skip to content

Call to a member function setContentType() on null - Responsetrait #4524

Closed
@davodm

Description

@davodm

Hi, I had a similar problem as described in the forum, but I didn't see any fix yet, so I decided to post the bug here for fixing in the future.
https://forum.codeigniter.com/thread-77516.html

The bug occurred on response API with this error:
Call to a member function setContentType() on null - on line 114 Responsetrait.php

Its also fixed as it described in the topic:
public function respond($data = null, int $status = null, string $message = '') { $this->response=service('response');

  • Web server Apache 2.4.46
  • PHP version 7.4

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

    waiting for infoIssues or pull requests that need further clarification from the author

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions