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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 14:01:33 2024 UTC