[Tickets #5472] Unable to delete tasks (Nag H3 (2.2-cvs))
bugs at bugs.horde.org
bugs at bugs.horde.org
Mon Jun 18 10:13:11 UTC 2007
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=5472
-----------------------------------------------------------------------
Ticket | 5472
Created By | kaosbunny at gmail.com
Summary | Unable to delete tasks (Nag H3 (2.2-cvs))
Queue | Nag
Version | HEAD
Type | Bug
State | Unconfirmed
Priority | 2. Medium
Owners |
-----------------------------------------------------------------------
kaosbunny at gmail.com (2007-06-18 03:13) wrote:
When I try to delete a task I get the error:
Fatal error: Cannot use object of type PEAR_Error as array in
/usr/share/colab/horde/nag/task.php on line 21
It seems that the $tasklist_id argument passed to _delete() is NULL (which
comes from the $vars->get('old_tasklist')) when it should be set to my
userid and makes the Nag::GetTask() to fail.
I have managed to isolate it to line 63 in /horde/nag/lib/Forms/task.php:
count($tasklists) > 1) {
which I basically interpret as "only do this if there are more than one
tasklists".
However, it seems to be necessary to do $vars->set('old_tasklist'); even
with only one tasklist, so changing it to
count($tasklists) > 0) {
solved the problem. (As would deleting that condition alltogether I
suppose.)
My personal reflection would be that the idea was to only use old_tasklist
if there is a chance of confusing which tasklist owned the task (i.e. when
having multiple tasklists), but it is however used "blindly" in the
_delete() function in horde/nag/task.php.
So when this is done with a user with multiple tasklists, no error is ever
encountered.
More information about the bugs
mailing list