Welcome Guest, Not a member yet? Register   Sign In
passing parameter bug?
#3

[eluser]sukuiter[/eluser]
[quote author="InsiteFX" date="1299785533"]No it's not a bug! If the value is 0 it thinks it is FALSE so it will not print 0.
You can try this below, not tested!
Code:
$this->pass['level'] = ($this->input->post('level_up') == FALSE)
    ? '0';
    : $this->input->post('level_up');

You may also need to check it for NULL.

InsiteFX[/quote]

I did several tests using isset() and empty() also.
The result is same. Seems like it's like you said, zero in php means empty or false.
I cannot use zero for status code then.. Sad

Thanks for the explanation Big Grin


Messages In This Thread
passing parameter bug? - by El Forum - 03-10-2011, 04:20 AM
passing parameter bug? - by El Forum - 03-10-2011, 07:32 AM
passing parameter bug? - by El Forum - 03-10-2011, 10:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB