Bug correction in index.php

If time is AM, $_POST['date_hour'] is 0, so it is empty and submission
fails. Replaced empty by isset in index.php to solve this issue.
This commit is contained in:
Phyks 2013-11-04 19:53:47 +01:00
parent d6e1a89be9
commit 523daa3f00
1 changed files with 1 additions and 1 deletions

View File

@ -488,7 +488,7 @@
}
}
if(!empty($_POST['what']) && !empty($_POST['amount']) && (float) $_POST['amount'] != 0 && !empty($_POST['date_hour']) && !empty($_POST['date_day']) && !empty($_POST['date_month']) && !empty($_POST['date_year']) && !empty($_POST['users_in'])) {
if(!empty($_POST['what']) && !empty($_POST['amount']) && (float) $_POST['amount'] != 0 && isset($_POST['date_hour']) && !empty($_POST['date_day']) && !empty($_POST['date_month']) && !empty($_POST['date_year']) && !empty($_POST['users_in'])) {
if(check_token(600, 'new_invoice')) {
if($_POST['amount'] <= 0) {
$tpl->assign('error', $errors['negative_amount'][LANG]);