replaced empty() with isset() to avoid parsing zeroes as empty value

This commit is contained in:
Serghey Rodin 2013-08-20 14:10:58 +03:00
commit f822d0daf7
2 changed files with 12 additions and 12 deletions

View file

@ -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']);