php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17330 empty() function fails when passing data from statically called class method
Submitted: 2002-05-21 04:11 UTC Modified: 2002-05-21 05:22 UTC
From: etriaph at kdesktop dot org Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.2.0 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: etriaph at kdesktop dot org
New email:
PHP Version: OS:

 

 [2002-05-21 04:11 UTC] etriaph at kdesktop dot org
The following error occurred: 
 
<b>Parse error</b>:  parse error, unexpected T_STRING, 
expecting T_VARIABLE or '$' in <b>/www/htdocs/index.wc</b> 
on line <b>21</b><br /> 
 
When I ran the following code: 
 
    if (!empty(HttpRequest::fetchPost(ENT))) 
    { 
        // code. 
    } 
 
The internals of HttpRequest::fetchPost() returns the value 
of $HTTP_POST_VARS[ENT].  ENT is properly defined (as 
"ent"), and I was able to fix it by doing: 
 
    $postData = HttpRequest::fetchPost(ENT); 
 
    if (!empty($postData)) 
    { 
        // code. 
    { 
 
My original code should execute without fail in my opinion, 
but if there is an acceptable reason for this bug, then so 
be it. 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-21 05:22 UTC] derick@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.

Empty only works on *variables*.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 14:01:36 2025 UTC