diff --git a/ext/not_a_tag/main.php b/ext/not_a_tag/main.php index c73df2f4..be1c3e22 100644 --- a/ext/not_a_tag/main.php +++ b/ext/not_a_tag/main.php @@ -77,7 +77,9 @@ class NotATag extends Extension $pairs = $database->get_pairs("SELECT LOWER(tag), redirect FROM untags"); foreach ($pairs as $tag => $url) { - if (in_array(strtolower($tag), $tags)) { + // cast to string because PHP automatically turns ["69" => "No sex"] + // into [69 => "No sex"] + if (in_array(strtolower((string)$tag), $tags)) { throw new TagSetException("Invalid tag used: $tag", $url); } } diff --git a/ext/numeric_score/main.php b/ext/numeric_score/main.php index 8024304c..a24ac089 100644 --- a/ext/numeric_score/main.php +++ b/ext/numeric_score/main.php @@ -152,7 +152,7 @@ class NumericScore extends Extension $result = $database->get_col($sql, $args); $images = []; foreach ($result as $id) { - $images[] = Image::by_id(int_escape($id)); + $images[] = Image::by_id((int)$id); } $this->theme->view_popular($images, $dte);