fix for checking specialmailboxes.
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 14 Nov 2002 10:29:30 +0000 (10:29 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 14 Nov 2002 10:29:30 +0000 (10:29 +0000)
This solves the problem when a special mailbox isn't set and IsBoxBelow
gives a warning

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4145 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_mailbox.php

index 0cae70822d952b131522e978cc4b2f8cb5550e50..2e92dd275c86b3f6c061c75694f7de0be4686f70 100755 (executable)
@@ -136,14 +136,13 @@ function isSpecialMailbox( $box ) {
            $move_to_trash, $move_to_sent, $save_as_draft;
 
     $ret = ( (strtolower($box) == 'inbox') ||
-             ( $move_to_trash && isBoxBelow( $box, $trash_folder ) ) ||
-             ( $move_to_sent && isBoxBelow( $box, $sent_folder )) ||
+             ( $move_to_trash && $trash_folder && isBoxBelow( $box, $trash_folder )) ||
+             ( $move_to_sent  && $sent_folder  && isBoxBelow( $box, $sent_folder  )) ||
              ($save_as_draft && $box == $draft_folder ) );
 
     if ( !$ret ) {
         $ret = do_hook_function( 'special_mailbox', $box );
     }
-
     return $ret;
 }