php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28998 foreach() does not work when glob() returns false
Submitted: 2004-07-03 02:44 UTC Modified: 2004-07-04 18:43 UTC
From: zpiranha at piranhaweb dot xgt dot us Assigned:
Status: Closed Package: Arrays related
PHP Version: 4.3.7 OS: Redhat 7.3
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: zpiranha at piranhaweb dot xgt dot us
New email:
PHP Version: OS:

 

 [2004-07-03 02:44 UTC] zpiranha at piranhaweb dot xgt dot us
Description:
------------
When using PHP 4.3.7, foreach() will produce error messages when glob() returns false. However, it will still function. The error message is very unsightly.


Download the script in question from http://piranhaweb.xgt.us/dl/zChat_1.4.zip

Note: The script works perfectly fine in previous versions of PHP.

Reproduce code:
---------------
http://www.familytables.net/chat

Expected result:
----------------
In the right-hand frame, where the error is mostly occuring, you will see (assuming nobody is in the chat room):

x Active Users
INVALID ARGUMENT FOR FOREACH() ERROR
name (y)
name (y)
...


Actual result:
--------------
1 Active Users
Error: Invalid argument supplied for foreach() in online.php

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-04 18:43 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 02 11:01:32 2024 UTC