[pve-devel] [PATCH common] set default event if empty

Dominik Csapak d.csapak at proxmox.com
Mon Jun 12 15:03:09 CEST 2017


to avoid "use of uninitialized value in pattern match at line 105"

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/PVE/CalendarEvent.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/PVE/CalendarEvent.pm b/src/PVE/CalendarEvent.pm
index a053f38..b285871 100644
--- a/src/PVE/CalendarEvent.pm
+++ b/src/PVE/CalendarEvent.pm
@@ -36,6 +36,9 @@ sub pve_verify_calendar_event {
 sub parse_calendar_event {
     my ($event) = @_;
 
+    # set default
+    $event = '*/15' if $event eq '';
+
     my $parse_single_timespec = sub {
 	my ($p, $max, $matchall_ref, $res_hash) = @_;
 
-- 
2.11.0





More information about the pve-devel mailing list