PHP 4.0 Bug #10102 Updated: Parse error

From: Date: Mon, 02 Apr 2001 09:06:17 +0000
Subject: PHP 4.0 Bug #10102 Updated: Parse error
Groups: php.dev 
Request: Send a blank email to php-dev+get-50546@lists.php.net to get a copy of this message
ID: 10102 Updated by: hholzgra Reported By: pulstar@mail.com Old-Status: Open Status: Analyzed Old-Bug Type: Scripting Engine problem Bug Type: Feature/Change Request Assigned To: Comments: empty() will only accept variables, no expressions the error message is a little misleading, do i move this to feature requests: "have a better error message when argument to empty() isn't a variable" Previous Comments: --------------------------------------------------------------------------- [2001-04-01 19:05:21] pulstar@mail.com Parse error: parse error, expecting `')'' in c:sitehomenews.php on line 21 Line 21: if(!empty($news->getField(url))) Line 22: echo $news->getField(url); What is wrong in this line? I changed it to: $thing=$news->getField(url); if(!empty($thing)) echo $news->getField(url); Now, it works fine. Weird... --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10102&edit=2

« previous php.dev (#50546) next »