From 26824f3d51554b2c5a57bcedf3eeede760d1483a Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Tue, 18 Mar 2014 12:08:54 +0100 Subject: [PATCH] Consider VTODOs in pre-check --- plugins/libcalendaring/libvcalendar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php index 674669da..0bfa521e 100644 --- a/plugins/libcalendaring/libvcalendar.php +++ b/plugins/libcalendaring/libvcalendar.php @@ -129,7 +129,7 @@ class libvcalendar implements Iterator try { // estimate the memory usage and try to avoid fatal errors when allowed memory gets exhausted if ($memcheck) { - $count = substr_count($vcal, 'BEGIN:VEVENT'); + $count = substr_count($vcal, 'BEGIN:VEVENT') + substr_count($vcal, 'BEGIN:VTODO'); $expected_memory = $count * 70*1024; // assume ~ 70K per event (empirically determined) if (!rcube_utils::mem_check($expected_memory)) {