#35067 [Opn->Csd]: scripts hangs on netx() prev()
| From: | iliaa@php.net | Date: | Wed, 02 Nov 2005 17:58:08 +0000 |
| Subject: | #35067 [Opn->Csd]: scripts hangs on netx() prev() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-87423@lists.php.net to get a copy of this message | ||
ID: 35067
Updated by: iliaa@php.net
Reported By: baroiller at aoditu dot com
-Status: Open
+Status: Closed
Bug Type: *General Issues
Operating System: linux redhat 7.2
PHP Version: 4.4.1
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2005-11-02 15:46:57] 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...)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35067&edit=1