Re: Warnings w/ !$var!?
| From: | CC Zona | Date: | Fri, 20 Apr 2001 18:07:23 +0000 |
| Subject: | Re: Warnings w/ !$var!? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49591@lists.php.net to get a copy of this message | ||
In article <3AE049B6.6080902@rightstep.org>,
nick@rightstep.org (Nicholas Pappas) wrote:
> When I check a variable (say, in a if() statement) via !$var, I get a
> Warning message printed saying that it is not initialized (if that is
> the case)... well, that's part of the reason why I bloody doing the test!
<snip>
> I am aware of the isset($var) function, but this does work for my purposes.
It sure sounds like the right function for your purposes. Or are you
really trying to do an..
if(!isset($var) or empty($var))
...? Because if you do it like that (isset check first), the warning won't
come up, even on E_ALL.
--
CC