From e1d7fc3c14dfb858ff5464062ff51ecf3be1d4ae Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Mon, 8 May 2017 19:16:00 -0700 Subject: [PATCH] Don't check fields that don't exist https://github.com/webmin/webmin/issues/553 --- time/time-lib.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/time/time-lib.pl b/time/time-lib.pl index 40bc00597..adb98b6b2 100755 --- a/time/time-lib.pl +++ b/time/time-lib.pl @@ -20,8 +20,9 @@ sub find_cron_job { &foreign_require("cron", "cron-lib.pl"); my @jobs = &cron::list_cron_jobs(); -my ($job) = grep { $_->{'command'} eq $cron_cmd && - $_->{'user'} eq 'root' } @jobs; +my ($job) = grep { $_->{'command'} && $_->{'user'} && + $_->{'command'} eq $cron_cmd && + $_->{'user'} eq 'root' } @jobs; return $job; }