[dev] errors when doing maintenance with no sent-mail folders configured

Peter Arien peter.arien@cc.kuleuven.ac.be
Wed, 04 Sep 2002 12:30:12 +0200


Hi all

It's the beginning of a new month, so my horde test-setup
(CVS RELENG) presents me with the "Mail Maintenance
Operations - Confirmation" screen. Here's what I get:

----------------------
Warning: Can only flip STRING and INTEGER values! in 
/usr/local/cvs/horde/imp/lib/Maintenance/Task/rename_sentmail_monthly.php 
on line 87

Mail Maintenance Operations - Confirmation

Warning! Mail is ready to perform the maintenance operations checked below.
Check the box for any operation(s) you want to perform at this time.

- The current folder(s) "" will be renamed to "".
- All old sent-mail folders more than 12 months old will be
   deleted.
+ All messages in your "Trash" folder older than 10 days will
   be permanently deleted.
----------------------

If I continue whith all the options checked, I get the following:

----------------------
Warning: Can only flip STRING and INTEGER values! in 
/usr/local/cvs/horde/imp/lib/Maintenance/Task/rename_sentmail_monthly.php 
on line 41

Warning: Cannot add header information - headers already sent by (output 
started at 
/usr/local/cvs/horde/imp/lib/Maintenance/Task/rename_sentmail_monthly.php:41) 
in /usr/local/cvs/horde/imp/redirect.php on line 64
----------------------

I did not set a Sent-mail folder in my Identities config.
Shouldn't there be a check for an empty $folder_list before
doing the actual renaming? Something like an

  if (count($folder_list)>0) {

on lines 39 and 85 of
imp/lib/Maintenance/Task/rename_sentmail_monthly.php


-- 
Peter

  K.U.Leuven - LUDIT             -=- Tel: +32 16 322219
  peter.arien@cc.kuleuven.ac.be  -=- http://pa.cc.kuleuven.ac.be