I have a function (function a) which calls another function (function b) that then executes a curl request. It works fine and returns all data. But if I try and call function a from function c, no data is returned.
class this_class {
public function a() {
$data = $this->b();
return $data; // returns $json
}
public function c() {
$more_data = $this->a();
return $more_data; // returns nothing
}
public function b() {
// curl stuff
return $json; // returns $json
}