Edit report at http://bugs.php.net/bug.php?id=10102&edit=1

 ID:                 10102
 Updated by:         [email protected]
 Reported by:        pulstar at mail dot com
 Summary:            need a better error message when argument to empty()
                     isn't a variable
-Status:             Analyzed
+Status:             Closed
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 Operating System:   *
 PHP Version:        4CVS, 5CVS (2004-04-13)
-Assigned To:        
+Assigned To:        jani
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2001-04-02 05:06:17] [email protected]

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/bug.php?id=10102&edit=1

Reply via email to