Commit 4a6efd73 authored by Floréal Cabanettes's avatar Floréal Cabanettes

Fix time parameters check

parent 581209c7
......@@ -163,13 +163,13 @@ function qrecipewriter_new_post() {
unset($params["id"]);
}
if (array_key_exists("tps_prep", $_POST) && filter_var($_POST["tps_prep"], FILTER_VALIDATE_INT) === true) {
if (array_key_exists("tps_prep", $_POST) && is_numeric($_POST["tps_prep"])) {
$params["tps_prep"] = $_POST["tps_prep"];
}
if (array_key_exists("tps_cuis", $_POST) && filter_var($_POST["tps_cuis"], FILTER_VALIDATE_INT) === true) {
if (array_key_exists("tps_cuis", $_POST) && is_numeric($_POST["tps_cuis"])) {
$params["tps_cuis"] = $_POST["tps_cuis"];
}
if (array_key_exists("tps_rep", $_POST) && filter_var($_POST["tps_rep"], FILTER_VALIDATE_INT) === true) {
if (array_key_exists("tps_rep", $_POST) && is_numeric($_POST["tps_rep"])) {
$params["tps_rep"] = $_POST["tps_rep"];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment