Skip to content

Commit

Permalink
Fix PHP 7 typecasting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
rxu committed May 10, 2017
1 parent eb57fcb commit 4a8cf97
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions acp/acp_thanks_refresh_module.php
Expand Up @@ -91,19 +91,19 @@ function main($id, $mode)
// check mode
if (confirm_box(true))
{
$all_users_thanks = $cache->get('_all_users_thanks');
$all_thanks = $cache->get('_all_thanks');
$all_users_thanks = (int) $cache->get('_all_users_thanks');
$all_thanks = (int) $cache->get('_all_thanks');
$all_posts = $cache->get('_all_posts');
$all_posts_number = $cache->get('_all_posts_number');
$all_posts_thanks = $cache->get('_all_posts_thanks');
$all_posts_number = (int) $cache->get('_all_posts_number');
$all_posts_thanks = (int) $cache->get('_all_posts_thanks');

// update delete posts
if (!empty($all_posts))
{
$sql = 'DELETE FROM ' . $thanks_table ."
WHERE " . $db->sql_in_set('post_id', $all_posts, false);
$result = $db->sql_query($sql);
$del_thanks = $db->sql_affectedrows($result);
$del_thanks = (int) $db->sql_affectedrows($result);
$db->sql_freeresult($result);
}
$end_thanks = $all_thanks - $del_thanks;
Expand Down

0 comments on commit 4a8cf97

Please sign in to comment.