Skip to content

Commit 3130e3f

Browse files
committed
Add int casting and remove double quotes from query
1 parent a39f113 commit 3130e3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

captcha/sortables.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ public function load_answer()
443443
// Let's load the answers
444444
$sql = 'SELECT answer_id, answer_text
445445
FROM ' . $this->table_sortables_answers . "
446-
WHERE question_id = '" . (int) $this->question . "'
446+
WHERE question_id = " . (int) $this->question . "
447447
ORDER BY " . $this->sql_random();
448448
$result = $this->db->sql_query($sql);
449449

@@ -826,7 +826,7 @@ public function acp_input_options_to_array($options)
826826
public function acp_update_question($data, $question_id)
827827
{
828828
// easier to delete all answers than to figure out which to update
829-
$sql = 'DELETE FROM ' . $this->table_sortables_answers . " WHERE question_id = $question_id";
829+
$sql = 'DELETE FROM ' . $this->table_sortables_answers . " WHERE question_id = " . (int) $question_id;
830830
$this->db->sql_query($sql);
831831

832832
$langs = $this->get_languages();

0 commit comments

Comments
 (0)