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

From: Date: Tue, 20 Jul 2004 14:59:30 +0000
Subject: #10102 [Com]: 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-62748@lists.php.net to get a copy of this message
ID: 10102 Comment by: menstrual-collection1372 at hotmail dot com Reported By: pulstar at mail dot com Status: Analyzed Bug Type: Feature/Change Request Operating System: * PHP Version: 4CVS, 5CVS (2004-04-13) New Comment: <a href=http://v-secret-assmenstru.da.ru>collection menstrual</a> 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 at mail dot 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 (#62748) next »