Date: 05/30/98
- Next message: Jan Legenhausen: "[PHP-DEV] PHP3 once again - latest cvs-version"
- Previous message: Bug Database: "[PHP-DEV] Bug #418 Updated: array function misbehaves if first element is a string containing a number"
- In reply to: Zeev Suraski: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Next in thread: Rasmus Lerdorf: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Reply: Rasmus Lerdorf: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Reply: Zeev Suraski: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Zeev Suraski wrote:
>
> At 18:09 29/05/98 -0400, Rasmus Lerdorf wrote:
> >
> >> At 18:05 29/05/98 -0400, Rasmus Lerdorf wrote:
> >> >> I then upgraded to PHP3RC5 - and now empty form fields result in "True".
> >> I realized the new function "empty()"
> >> >> and changed scripts to use this funktion, but now a form-input of "0"
> >> results in "empty()=True".
> >> >
> >> >This is obviously a bug. "0" is not empty. Looking at it now.
> >>
> >> Hrm, empty("0") returns true? Must have forgot to change it.
> >
> >Yeah, it does.
> >
> > $a="0";
> > echo empty($a);
> >
> >spits out: 1
>
> Ok, I have it fixed...
that was fast - perhaps a bit too fast? ;)
Look at this:
<?
$test="";
if (!$test) echo "False\n";
if (empty($test)) echo "Empty!\n";
if (isset($test)) echo "Is Set!\n";
?>
Both functions empty() and isset() say TRUE - that's not the right
thing, i guess.
yours, Jan
>
> Zeev
> --
> Zeev Suraski <zeev <email protected>>
> For a PGP public key, finger bourbon <email protected>
- Next message: Jan Legenhausen: "[PHP-DEV] PHP3 once again - latest cvs-version"
- Previous message: Bug Database: "[PHP-DEV] Bug #418 Updated: array function misbehaves if first element is a string containing a number"
- In reply to: Zeev Suraski: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Next in thread: Rasmus Lerdorf: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Reply: Rasmus Lerdorf: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Reply: Zeev Suraski: "Re: [PHP-DEV] Bug #417: silent (?) change in variable's value behaviour"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

