empty() doesn't work with codeigniter input class

Posted by BabyAzerty on Stack Overflow See other posts from Stack Overflow or by BabyAzerty
Published on 2012-07-08T09:13:10Z Indexed on 2012/07/08 9:15 UTC
Read the original article Hit count: 108

Filed under:
|
|

This is really weird. Whenever I call something like

if(empty($this->input->post("foo")){//blabla}

The whole PHP is "down" and I get a blank page from the website (even when I don't pass through this empty(input) line).

I know this is not the right method and it is stupid, I change the code to

if(!$this->input->post("foo")){//blabla}

Better I guess ?

Seriously, how come the empty(input) breaks down the entire PHP page ? (I can't get any echo "something").

© Stack Overflow or respective owner

Related posts about php

Related posts about codeigniter