note 125383 added to function.imap-thread
| From: | p2.eduardoruiz.es via php-notes | Date: | Mon, 21 Sep 2020 13:36:35 +0000 |
| Subject: | note 125383 added to function.imap-thread | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-215169@lists.php.net to get a copy of this message | ||
Fix
XX.num maybe 0, then stop
<?php
function FindThread(&$mailbox, $uid) {
$mails = array();
$thread = imap_thread($mailbox, SE_UID);
$i = array_search($uid, $thread);
while(($tree = explode('.', $i)) && ($j = array_search($tree[0], $thread))
&&
($treej = explode('.', $j)) && $treej[0] && ($k =
array_search($treej[0], $thread)) && ($treek = explode('.', $k)) &&
$thread[$treej[0] . '.num'] && $thread[$treek[0] . '.num']
&&
($thread[$treej[0] . '.next'] != 0 || $thread[$treek[0] . '.next'] !=
0))
$i = $j;
$mails = FindThreadAll($thread, $tree[0]);
return $mails;
}
?>
Eduardo Ruiz (Spain)
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.172 (proxied: 85.31.132.140)
----
Manual Page -- http://php.net/manual/en/function.imap-thread.php
Edit -- https://master.php.net/note/edit/125383
Del: integrated -- https://master.php.net/note/delete/125383/integrated
Del: useless -- https://master.php.net/note/delete/125383/useless
Del: bad code -- https://master.php.net/note/delete/125383/bad+code
Del: spam -- https://master.php.net/note/delete/125383/spam
Del: non-english -- https://master.php.net/note/delete/125383/non-english
Del: in docs -- https://master.php.net/note/delete/125383/in+docs
Del: other reasons-- https://master.php.net/note/delete/125383
Reject -- https://master.php.net/note/reject/125383
Search -- https://master.php.net/manage/user-notes.php