Переглянути джерело

sqimap_utf7_decode_mbx_tree doesn't issue a return, but simply changes
the variables by reference to the call. This makes mbxs_tree an undefined
and unusued variable and might cause errors in php 4.4+ (especially with
objects).

jangliss 19 роки тому
батько
коміт
432d3946d9
2 змінених файлів з 5 додано та 2 видалено
  1. 2 0
      ChangeLog
  2. 3 2
      functions/imap_mailbox.php

+ 2 - 0
ChangeLog

@@ -473,6 +473,8 @@ Version 1.5.1 -- CVS
   - Undefined variable in rare case in view_header.php
   - Variable by reference fix in printer_friendly_bottom.php.
   - Undefined index in addressbook backends.
+  - sqimap_utf7_decode_mbx_tree returns variables by reference, rather than a 
+    return value (#1351822)
 
 
 Version 1.5.0 - 2 February 2004

+ 3 - 2
functions/imap_mailbox.php

@@ -1105,6 +1105,7 @@ function sqimap_fill_mailbox_tree($mbx_ary, $mbxs=false,$imap_stream) {
  * @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
@@ -1112,7 +1113,7 @@ function sqimap_utf7_decode_mbx_tree(&$mbx_tree) {
    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]);
+            sqimap_utf7_decode_mbx_tree($mbx_tree->mbxs[$i]);
       }
    }
 }
@@ -1252,4 +1253,4 @@ function sqimap_mailbox_is_noinferiors($oImapStream,$sImapFolder,&$oBoxes) {
     return false;
 }
 
-?>
+?>