[Tickets #550] Getting error during login in maintenance code

bugs at bugs.horde.org bugs at bugs.horde.org
Tue Sep 7 19:13:30 PDT 2004


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=550
-----------------------------------------------------------------------
 Ticket     | 550
 Updated By | stephen at mega.geek.nz
 Summary    | Getting error during login in maintenance code
 Queue      | Horde Framework
 State      | Feedback
 Priority   | 1. Low
 Type       | Bug
 Owners     | 
-----------------------------------------------------------------------


stephen at mega.geek.nz (2004-09-07 19:13) wrote:

I have updated the code and now get this error:

Undefined index: in /usr/share/pear/Horde/Maintenance.php on line 199
This is the line:
$action = $tasks[key($tasks)]['display'];

Here is the var dump of the maintenance object just before line 199:
object(maintenance_imp)(4) {
  ["maint_tasks"]=>
  array(6) {
    ["tos_agreement"]=>
    int(6)
    ["fetchmail_login"]=>
    int(5)
    ["rename_sentmail_monthly"]=>
    int(2)
    ["delete_sentmail_monthly"]=>
    int(2)
    ["delete_attachments_monthly"]=>
    int(2)
    ["purge_trash"]=>
    int(2)
  }
  ["_lastLogin"]=>
  int(0)
  ["_tasklist"]=>
  &object(maintenance_tasklist)(6) {
    ["_module"]=>
    string(3) "imp"
    ["_target"]=>
    string(42) "/horde/services/maintenance.php?module=imp"
    ["_postdata"]=>
    NULL
    ["_tasks"]=>
    array(0) {
    }
    ["_addFlag"]=>
    bool(false)
    ["_processed"]=>
    bool(false)
  }
  ["_taskCache"]=>
  array(0) {
  }
}

As the tasks array inside the task list object is empty the
_tasklist->getList() call for the maintenance object is returning null so,
the call on line 199 to get a value in the $tasks array fails as it is null.




More information about the bugs mailing list