09-10-2020, 10:14 AM
Hello, I don't know this is bug or not. But ...
I have Controller A with method like :
when call : http://localhost:8080/a/myjson
showing the output, JSON
but the problem is, when call by other controller show Error like
"Call to a member function setContentType() on null" ...
____
when code changed to
no error
I have Controller A with method like :
Code:
public function myjson() {
....
....
return $this->respond($json); // output JSON
}
when call : http://localhost:8080/a/myjson
showing the output, JSON
but the problem is, when call by other controller show Error like
"Call to a member function setContentType() on null" ...
____
when code changed to
Code:
public function myjson() {
....
....
return json_encode($json); // output JSON
}
no error