diff --git a/core/polyfills.php b/core/polyfills.php index a0ed4597..365e9ddb 100644 --- a/core/polyfills.php +++ b/core/polyfills.php @@ -613,7 +613,7 @@ function autodate(string $date, bool $html=true): string function isValidDateTime(string $dateTime): bool { if (preg_match("/^(\d{4})-(\d{2})-(\d{2}) ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/", $dateTime, $matches)) { - if (checkdate($matches[2], $matches[3], $matches[1])) { + if (checkdate((int)$matches[2], (int)$matches[3], (int)$matches[1])) { return true; } } @@ -628,7 +628,7 @@ function isValidDate(string $date): bool { if (preg_match("/^(\d{4})-(\d{2})-(\d{2})$/", $date, $matches)) { // checkdate wants (month, day, year) - if (checkdate($matches[2], $matches[3], $matches[1])) { + if (checkdate((int)$matches[2], (int)$matches[3], (int)$matches[1])) { return true; } } diff --git a/ext/tag_history/main.php b/ext/tag_history/main.php index fd7c93ea..57a4ca9c 100644 --- a/ext/tag_history/main.php +++ b/ext/tag_history/main.php @@ -303,7 +303,7 @@ class TagHistory extends Extension ', $select_args); if (!empty($row)) { - $revert_id = $row['id']; + $revert_id = (int)$row['id']; $result = $this->get_tag_history_from_revert($revert_id); if (empty($result)) { @@ -315,8 +315,8 @@ class TagHistory extends Extension } // lets get the values out of the result - $stored_result_id = int_escape($result['id']); - $stored_image_id = int_escape($result['image_id']); + $stored_result_id = (int)$result['id']; + $stored_image_id = (int)$result['image_id']; $stored_tags = $result['tags']; $image = Image::by_id($stored_image_id);