Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#106 Undefined variable in mime.php

closed-fixed
nobody
Bad String (2)
5
2005-11-09
2005-11-09
Jimmy Conner
No

Latest Devel CVS, noticed this small bug.

In functions/mime.php you will find this function

/**
* @param object $mbx_tree
* @since 1.5.0
*/
function sqimap_utf7_decode_mbx_tree(&$mbx_tree) {
if (strtoupper($mbx_tree->mailboxname_full) == 'INBOX')
$mbx_tree->mailboxname_sub = _("INBOX");
else
$mbx_tree->mailboxname_sub =
imap_utf7_decode_local($mbx_tree->mailboxname_sub);
if ($mbx_tree->mbxs) {
$iCnt = count($mbx_tree->mbxs);
for ($i=0;$i<$iCnt;++$i) {
$mbxs_tree->mbxs[$i] =
sqimap_utf7_decode_mbx_tree($mbx_tree->mbxs[$i]);
}
}
}

$mbxs_tree should probably be $mbx_tree, since its
undefined and unused otherwise. I ofcourse have no
clue what havoc this might cause, so its best if
someone more knowledgable with this code give it a look
over.

Discussion

  • Logged In: YES
    user_id=620333

    Thank you for your report. If you try changing it to mbx_tree
    instead of mbxs_tree you will find that your mailbox tree
    empties and you don't have anything.
    sqimap_utf7_decode_mbx_tree does not return anything, but
    changes the mailbox properties by reference to the variable
    being passed. Fixed code is now in cvs, to fix yours, simple
    remove the "$mbxs_tree->mbxs[$i] = " from the above line.

     
    • status: open --> closed-fixed