Re: Am I just being stupid or something?
| From: | nicos@php.net | Date: | Mon, 02 Sep 2002 10:51:40 +0000 |
| Subject: | Re: Am I just being stupid or something? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-114898@lists.php.net to get a copy of this message | ||
Hi,
Yes sometimes it is treated as null. You should reconsider your code and use
empty() and not != "".
--
Merci de nous avoir choisi. - Thanks you for your choice.
Nicos - CHAILLAN Nicolas
nicos@worldakt.com
nicos@php.net
www.GroupAKT.com - Hébergement Group.
www.WorldAKT.com - Hébergement de sites Internet
"Francis" <news@radnip.com> a écrit dans le message de news:
20020902090547.16883.qmail@pb1.pair.com...
> Ok whats going on here:
>
> echo "Location: ".$_SESSION["Project"]["location"];
> // above echo's "Location: 0"
> if($_SESSION["Project"]["location"] !=""){
> if (checkAccess("folder", $_SESSION["Project"]["location"],
> "create")){
> newfile();
> }else{
> reportError(1, "Access Denied");
> }
> }else{
> fatelError(1, "Session Location Error");
> }
>
> Ok $_SESSION["Project"]["location"] is set to 0 but for some reason it
> always calls fatelError? even tho $_SESSION["Project"]["location"] is set
to
> 0 can anyone see anything wrong? is 0 treated as null or something?
>
>
>