|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35067 scripts hangs on netx() prev()
Submitted: 2005-11-02 15:46 UTC Modified: 2005-11-02 22:07 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: baroiller at aoditu dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.4.1 OS: linux redhat 7.2
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.
Block user comment
Status: Assign to:
Bug Type:
From: baroiller at aoditu dot com
New email:
PHP Version: OS:


 [2005-11-02 15:46 UTC] baroiller at aoditu dot com
Many "open source" softwares like phpadsnew, and squiremail ( i've got problems on theses ), hangs.
after looking into their code, i've found that all fuctions reset(), next(), prev() hangs when passed value is'nt an array.

Reproduce code:
code sample (all latest versions) :
// phpAdsNew

if (phpAds_isUser(phpAds_Admin))
   $pages[]        = $phpAds_nav['admin'];
elseif (phpAds_isUser(phpAds_Client))
   $pages[]  = $phpAds_nav['client'];
elseif (phpAds_isUser(phpAds_Affiliate))
   $pages[]  = $phpAds_nav['affiliate'];
   $pages  = array();
for (reset($pages);$key=key($pages);next($pages))
   //// .... ////

// squireMail 

if (is_array($msort)) { 
 for (reset($msort); ($key = key($msort)), (isset($key)); next($msort)) {
  //// ... ////

Actual result:
added $pages = array() for phpadsnew ( bug fixed )

but, put code into comments onto squiremail ( don't have any time...)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-02 18:58 UTC]
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
Thank you for the report, and for helping us make PHP better.

 [2005-11-02 22:07 UTC] baroiller at aoditu dot com
good work, thanks ;)
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun May 16 07:01:24 2021 UTC