fix recurring tasks

This commit is contained in:
DavidBadura
2015-04-03 14:11:02 +00:00
parent 4a36d7e511
commit 44274c6fc2
3 changed files with 36 additions and 9 deletions

View File

@@ -278,9 +278,8 @@ class Task
$this->recur = new Recurring($recur);
} elseif ($recur instanceof Recurring) {
$this->recur = $recur;
} else {
throw new TaskwarriorException();
} elseif ($this->recur && is_null($recur)) {
throw new TaskwarriorException('You cannot remove the recurrence from a recurring task.');
}
}