php.net |  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
Votes:1
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
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: baroiller at aoditu dot com
New email:
PHP Version: OS:

 

 [2005-11-02 15:46 UTC] baroiller at aoditu dot com
Description:
------------
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'];
else
   $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...)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-02 18:58 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.


 [2005-11-02 22:07 UTC] baroiller at aoditu dot com
good work, thanks ;)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 05:01:29 2024 UTC