|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-02 18:58 UTC] iliaa@php.net
[2005-11-02 22:07 UTC] baroiller at aoditu dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 19:00:01 2025 UTC |
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...)