aboutsummaryrefslogtreecommitdiffstats
path: root/apps/tasks
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-04-20 18:18:07 +0200
committerBart Visscher <bartv@thisnet.nl>2012-04-20 18:18:07 +0200
commit70ba4282225e1e27cd36bb4b403373f2fcc100c7 (patch)
tree3f4184c73537287d2a84ae23a43367c3db9ff58d /apps/tasks
parentc75bbb59a9c065ff7e76558ba7d2e0fab33df0b8 (diff)
downloadnextcloud-server-70ba4282225e1e27cd36bb4b403373f2fcc100c7.tar.gz
nextcloud-server-70ba4282225e1e27cd36bb4b403373f2fcc100c7.zip
Tasks: Make gettasks more robust against malformed VTODO data
Diffstat (limited to 'apps/tasks')
-rw-r--r--apps/tasks/ajax/gettasks.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/tasks/ajax/gettasks.php b/apps/tasks/ajax/gettasks.php
index ee871c344cf..cd8d26f480e 100644
--- a/apps/tasks/ajax/gettasks.php
+++ b/apps/tasks/ajax/gettasks.php
@@ -26,7 +26,11 @@ foreach( $calendars as $calendar ){
}
$object = OC_VObject::parse($task['calendardata']);
$vtodo = $object->VTODO;
- $tasks[] = OC_Task_App::arrayForJSON($task['id'], $vtodo, $user_timezone);
+ try {
+ $tasks[] = OC_Task_App::arrayForJSON($task['id'], $vtodo, $user_timezone);
+ } catch(Exception $e) {
+ OC_Log::write('tasks', $e->getMessage(), OC_Log::ERROR);
+ }
}
}