Re: checking the return value of member function with empty

From: Date: Sun, 10 Aug 2003 01:02:55 +0000
Subject: Re: checking the return value of member function with empty
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-159008@lists.php.net to get a copy of this message
On Sat, 09 Aug 2003 20:00:57 -0500 "Edward Rudd" <eddie@omegaware.com> wrote: > I am having this rather annoying syntax problem. > > I have this.. > if (!empty($this->GetParam('someparameter')) { > // OK do something since the parameter is set. > } if (!empty($this->GetParam('someparameter'))) { // OK do something since the parameter is set. } > However that fails with this parse error > > parse error, expecting `')'' > > Why??? > > If I do this > $var = $this->GetParam('someparameter')); > if (!empty($var)) { > // same thing as before > } > it works fine with no error.. > > This *SHOULD* be syntactically correct, but php doesn't think so. > Should I file a bug on this one? > Oh yeah, normal information about running environment. > PHP version 4.3.2 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- Andu

« previous php.general (#159008) next »