do not evaluate count at each iteration

This commit is contained in:
Frédéric FRANCE 2019-11-25 20:07:29 +01:00 committed by GitHub
parent 2f3614df8a
commit 4056848483
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1136,7 +1136,8 @@ class EmailCollector extends CommonObject
$elements = imap_mime_header_decode($overview[0]->subject);
$newstring = '';
if (! empty($elements)) {
for ($i = 0; $i < count($elements); $i++) {
$num = count($elements);
for ($i = 0; $i < $num; $i++) {
$newstring .= ($newstring ? ' ' : '').$elements[$i]->text;
}
$overview[0]->subject = $newstring;