mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 05:44:08 -07:00
replaced empty() with isset() to avoid parsing zeroes as empty value
This commit is contained in:
parent
f3ec3bb7aa
commit
f822d0daf7
2 changed files with 12 additions and 12 deletions
|
@ -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']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue