From f822d0daf7cea4360df0ae9c8d5ff301a1c0a2e2 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 20 Aug 2013 14:10:58 +0300 Subject: [PATCH] replaced empty() with isset() to avoid parsing zeroes as empty value --- web/add/cron/index.php | 12 ++++++------ web/templates/admin/edit_cron.html | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/web/add/cron/index.php b/web/add/cron/index.php index f2fd6bf9..b8790ebc 100644 --- a/web/add/cron/index.php +++ b/web/add/cron/index.php @@ -16,12 +16,12 @@ top_panel($user,$TAB); //if ($_SESSION['user'] == 'admin') { if (!empty($_POST['ok'])) { // Check input - if (empty($_POST['v_min'])) $errors[] = __('minute'); - if (empty($_POST['v_hour'])) $errors[] = __('hour'); - if (empty($_POST['v_day'])) $errors[] = __('day'); - if (empty($_POST['v_month'])) $errors[] = __('month'); - if (empty($_POST['v_wday'])) $errors[] = __('day of week'); - if (empty($_POST['v_cmd'])) $errors[] = __('cmd'); + if (!isset($_POST['v_min'])) $errors[] = __('minute'); + if (!isset($_POST['v_hour'])) $errors[] = __('hour'); + if (!isset($_POST['v_day'])) $errors[] = __('day'); + if (!isset($_POST['v_month'])) $errors[] = __('month'); + if (!isset($_POST['v_wday'])) $errors[] = __('day of week'); + if (!isset($_POST['v_cmd'])) $errors[] = __('cmd'); // Protect input $v_min = escapeshellarg($_POST['v_min']); diff --git a/web/templates/admin/edit_cron.html b/web/templates/admin/edit_cron.html index 9be88c14..45dd5839 100644 --- a/web/templates/admin/edit_cron.html +++ b/web/templates/admin/edit_cron.html @@ -52,7 +52,7 @@ - > + >