mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 02:51:35 +02:00
[ticket/11162] Use integer casting instead of SQL escape.
PHPBB3-11162
This commit is contained in:
@@ -61,7 +61,7 @@ class phpbb_update_rows_avoiding_duplicates_test extends phpbb_database_test_cas
|
|||||||
|
|
||||||
$sql = 'SELECT count(*) AS count
|
$sql = 'SELECT count(*) AS count
|
||||||
FROM ' . TOPICS_WATCH_TABLE . '
|
FROM ' . TOPICS_WATCH_TABLE . '
|
||||||
WHERE topic_id = ' . $db->sql_escape($to);
|
WHERE topic_id = ' . (int) $to;
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$result_count = $db->sql_fetchfield('count');
|
$result_count = $db->sql_fetchfield('count');
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
Reference in New Issue
Block a user