From: <pdo...@us...> - 2023-12-11 20:12:17
|
Revision: 15001 http://sourceforge.net/p/squirrelmail/code/15001 Author: pdontthink Date: 2023-12-11 20:12:16 +0000 (Mon, 11 Dec 2023) Log Message: ----------- Fix: Don't feed an integer to sizeof() Modified Paths: -------------- trunk/squirrelmail/functions/imap_messages.php Modified: trunk/squirrelmail/functions/imap_messages.php =================================================================== --- trunk/squirrelmail/functions/imap_messages.php 2023-12-11 19:54:47 UTC (rev 15000) +++ trunk/squirrelmail/functions/imap_messages.php 2023-12-11 20:12:16 UTC (rev 15001) @@ -614,7 +614,10 @@ * whatever order they wish... So we need to re-sort manually */ if ($bUidFetch) { - for ($i = 0; $i < sizeof($msg_list); $i++) { + // 1.4.x had a problem where $msg_list wasn't guaranteed to be an array, + // but the following doesn't seem to be necessary in 1.5.x + $msg_count = is_array($msg_list) ? sizeof($msg_list) : 1; + for ($i = 0; $i < $msg_count; $i++) { $aMessageList[$msg_list[$i]] = array(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |