2016-10-28 05:11
浏览 43


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>';
         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.

图片转代码服务由CSDN问答提供 功能建议

我有这个问题,我将响应发布到控制器,但它会抛出此错误。 这是我第一次遇到这个错误。


  if(isset($ this-)  &gt; input-&gt; post('responseCode')))
 echo'&lt; p&gt;&lt; strong&gt; Cardstream Response&lt; / strong&gt;&lt; / p&gt;'; 
 echo'&lt; pre&gt;  '; 
 print_r($ this-&gt; input-&gt; post()); 
 echo'&lt; / pre&gt;'; 

它指向此特定行 if(isset($ this-&gt; input-&gt; post('responseCode')))

这是一个 cardstream集成。 不幸的是我没有在codeigniter中找到cardstream的库,因此我使用的是同样的Core PHP代码。

任何帮助将不胜感激。 谢谢。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

3条回答 默认 最新

  • dongxu8533486 2016-10-28 05:16

    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')) {...
    解决 无用
    打赏 举报

相关推荐 更多相似问题