[pve-devel] [PATCH common] set default event if empty
Dietmar Maurer
dietmar at proxmox.com
Mon Jun 12 16:04:25 CEST 2017
Can we catch that at the caller site instead?
> On June 12, 2017 at 3:03 PM Dominik Csapak <d.csapak at proxmox.com> wrote:
>
>
> 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
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list