From 8b0ea48c38f1da3dcfeafd786459e130456d6feb Mon Sep 17 00:00:00 2001 From: Patrick Date: Mon, 20 Mar 2017 18:59:58 -0600 Subject: [PATCH] Fixes for strict types --- check_fighters.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/check_fighters.php b/check_fighters.php index ff577c408..80a97f793 100644 --- a/check_fighters.php +++ b/check_fighters.php @@ -1,4 +1,4 @@ -prepare($sql); -$stmt->bindParam(':sector_id', $sector); +$stmt->bindParam(':sector_id', $sector, PDO::PARAM_INT); $stmt->execute(); $sectorinfo = $stmt->fetch(PDO::FETCH_ASSOC); @@ -38,7 +38,7 @@ // Detect if this variable exists, and filter it. Returns false if anything wasn't right. $response = null; $response = filter_input(INPUT_POST, 'response', FILTER_SANITIZE_STRING); -if (mb_strlen(trim($response)) === 0) +if (($response === null) || (mb_strlen(trim($response)) === 0)) { $response = false; }