I have this issue where I am posting a response into the controller, however it throws this error. This is the first time I am coming across this error.
Kindly find the code below:
if (isset($this->input->post('responseCode')))
{
echo '<p><strong>Cardstream Response</strong></p>';
echo '<pre>';
print_r($this->input->post());
echo '</pre>';
}
It is pointing at this particular line if (isset($this->input->post('responseCode')))
This is a cardstream integration. Unfortunately I haven't found the library for cardstream in codeigniter, hence I am using the Core PHP code for the same.
Any help will be greatly appreciated. Thanks.
You are using isset()
on a method, which presumably returns a expression result. You cannot do that because isset()
is only used on variables. Try checking if it's null instead:
if ($this->input->post('responseCode') !== null) {...
Or simply:
if ($this->input->post('responseCode')) {...
Use this
if ($this->input->post('responseCode'))
instead isset()
checking
you cant use isset on a function you couldusse
if($this->input->post('responsecode'))
or if(!empty($this->input->post('responsecode')))