verify int arguments are ints
This commit is contained in:
parent
78096d436c
commit
de8301d173
@ -7,10 +7,9 @@ final class ApprController
|
||||
{
|
||||
Session::login_or_die();
|
||||
|
||||
$I_recipe_id = Utils::getOrDie($A_postParams, "recipe_id");
|
||||
$I_recipe_id = Utils::intOrDie(Utils::getOrDie($A_postParams, "recipe_id"));
|
||||
$S_comment = Utils::getOrDie($A_postParams, "comment");
|
||||
$I_score = Utils::getOrDie($A_postParams, "score");
|
||||
|
||||
$I_score = Utils::intOrDie(Utils::getOrDie($A_postParams, "score"));
|
||||
|
||||
$O_apprModel = new ApprModel();
|
||||
$O_apprModel->createAppr($_SESSION["ID"], $I_recipe_id, $S_comment, $I_score);
|
||||
@ -21,7 +20,7 @@ final class ApprController
|
||||
{
|
||||
Session::login_or_die();
|
||||
|
||||
$I_appr_id = $A_urlParams[0];
|
||||
$I_appr_id = Utils::intOrDie($A_urlParams[0]);
|
||||
|
||||
$O_apprModel = new ApprModel();
|
||||
$A_appr = $O_apprModel->getApprById($I_appr_id);
|
||||
|
Loading…
Reference in New Issue
Block a user