Type casting can be used.

(cherry picked from commit b5065ae)
This commit is contained in:
Yuriy Pikhtarev 2017-05-05 01:00:38 +03:00 committed by Vasily Komrakov
commit 21c8e7d48a
No known key found for this signature in database
GPG key ID: 558236680C20A69A
58 changed files with 226 additions and 228 deletions

View file

@ -40,7 +40,7 @@ $page_cfg['load_tpl_vars'] = array(
);
$newest = $next_topic_id = 0;
$start = isset($_GET['start']) ? abs(intval($_GET['start'])) : 0;
$start = isset($_GET['start']) ? abs((int)$_GET['start']) : 0;
$topic_id = isset($_GET[POST_TOPIC_URL]) ? (int)$_GET[POST_TOPIC_URL] : 0;
$post_id = (!$topic_id && isset($_GET[POST_POST_URL])) ? (int)$_GET[POST_POST_URL] : 0;
@ -54,7 +54,7 @@ $posts_per_page = $bb_cfg['posts_per_page'];
$select_ppp = '';
if ($userdata['session_admin']) {
if ($req_ppp = abs(intval(@$_REQUEST['ppp'])) and in_array($req_ppp, $bb_cfg['allowed_posts_per_page'])) {
if ($req_ppp = abs((int)(@$_REQUEST['ppp'])) and in_array($req_ppp, $bb_cfg['allowed_posts_per_page'])) {
$posts_per_page = $req_ppp;
}