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
 [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

Pull Requests

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: Wed Sep 18 21:01:26 2024 UTC