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:
parent
d6e1a89be9
commit
523daa3f00
@ -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(check_token(600, 'new_invoice')) {
|
||||||
if($_POST['amount'] <= 0) {
|
if($_POST['amount'] <= 0) {
|
||||||
$tpl->assign('error', $errors['negative_amount'][LANG]);
|
$tpl->assign('error', $errors['negative_amount'][LANG]);
|
||||||
|
Loading…
Reference in New Issue
Block a user