#10102 [Ana]: need a better error message when argument to empty() isn't a variable

From: Date: Thu, 08 Aug 2002 13:24:24 +0000
Subject: #10102 [Ana]: need a better error message when argument to empty() isn't a variable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16267@lists.php.net to get a copy of this message
ID: 10102 Updated by: sander@php.net -Summary: Parse error Reported By: pulstar@mail.com Status: Analyzed Bug Type: Feature/Change Request Operating System: Windows 98 4.10 english PHP Version: 4.0.4 New Comment: update summary Previous Comments: ------------------------------------------------------------------------ [2001-04-02 05:06:17] hholzgra@php.net 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" ------------------------------------------------------------------------ [2001-04-01 19:05:21] pulstar@mail.com Parse error: parse error, expecting `')'' in c:\site\home\news.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... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=10102&edit=1

« previous php.bugs (#16267) next »