Re: Re: Liveuser - adding users problem

From: Date: Thu, 01 Sep 2005 11:58:13 +0000
Subject: Re: Re: Liveuser - adding users problem
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20719@lists.php.net to get a copy of this message
Jeroen Houben wrote:
I changed the if statement from if ($required == 'seq') to if ($required === 'seq') It's really bizar and I don't know why, but if $required is set to TRUE, the IF statement evaluates to TRUE (?). Surely I must be doing something work, or overlooking something. Anyway, enforcing type checking fixes the problem.
good catch .. quite embarassing .. after your report i went looking .. "this can only happen if it would be mistaken for a sequence value" .. still did not see it .. since passwd is a required field it matches the criteria .. == does an automatic cast to boolean .. and 'seq' casts to true ... regards, Lukas

« previous php.pear.general (#20719) next »