I believe that's a type casting issue.
Your best bet would be reading php5 documentation at php.net
Don't quote me on this, but you either want to use a triple = (===) for type comparison, or you need to do something like '1' === (string) 1
Or... something like that.
I've seen it around, but haven't had a chance to dabble in it myself yet.
Look around a bit!