From: <pdo...@us...> - 2023-12-11 19:54:48
|
Revision: 15000 http://sourceforge.net/p/squirrelmail/code/15000 Author: pdontthink Date: 2023-12-11 19:54:47 +0000 (Mon, 11 Dec 2023) Log Message: ----------- Fix: Don't feed an integer to sizeof() Modified Paths: -------------- branches/SM-1_4-STABLE/squirrelmail/functions/imap_messages.php Modified: branches/SM-1_4-STABLE/squirrelmail/functions/imap_messages.php =================================================================== --- branches/SM-1_4-STABLE/squirrelmail/functions/imap_messages.php 2023-11-24 18:59:00 UTC (rev 14999) +++ branches/SM-1_4-STABLE/squirrelmail/functions/imap_messages.php 2023-12-11 19:54:47 UTC (rev 15000) @@ -731,7 +731,7 @@ global $squirrelmail_language, $color, $data_dir, $username, $imap_server_type; global $uid_support, $allow_server_sort, $extra_small_header_fields; /* Get the small headers for each message in $msg_list */ - $maxmsg = sizeof($msg_list); + $msg_count = is_array($msg_list) ? sizeof($msg_list) : 1; if ($show_num != '999999') { $msgs_str = sqimap_message_list_squisher($msg_list); } else { @@ -745,8 +745,8 @@ * in $msg_list, but IMAP servers are free to return responses in * whatever order they wish... So we need to re-sort manually */ - for ($i = 0; $i < sizeof($msg_list); $i++) { - $messages["$msg_list[$i]"] = array(); + for ($i = 0; $i < $msg_count; $i++) { + $messages[$msg_list[$i]] = array(); } $internaldate = getPref($data_dir, $username, 'internal_date_sort', SMPREF_ON); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |