Summary | Unable to delete tasks (Nag H3 (2.2-cvs)) |
Queue | Nag |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | chuck (at) horde (dot) org |
Requester | kaosbunny (at) gmail (dot) com |
Created | 06/18/2007 (6626 days ago) |
Due | |
Updated | 06/18/2007 (6626 days ago) |
Assigned | |
Resolved | 06/18/2007 (6626 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Assigned to Chuck Hagenbuch
State ⇒ Resolved
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Unable to delete tasks (Nag H3 (2.2-cvs))
Queue ⇒ Nag
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.