PHP Warning : A non-numeric value encountered
Question
I get this Warning: A non-numeric value encountered in /home/customer/www/example.com/public_html/wp-content/themes/boombox/includes/functions.php on line 2466
I try to change it from => $manual_amount + $user_votes; to $manual_amount += $user_votes; (it throws same warning) and $manual_amount . $user_votes; (it concatenates the numbers, does not add them)
/**
* Return post point count
*
* @param $post_id
*
* @return int
*/
function boombox_get_post_point_count($post_id)
{
$points_count = 0;
/*if ( boombox_module_management_service()->is_module_active( 'prs' ) ) {
$points_count = Boombox_Point_Count_Helper::get_post_points( $post_id );
}*/
$manual_amount = get_post_meta($post_id, "manual_vote_amount", true);
$user_votes = get_post_meta($post_id, "add_vote_amount", true);
$points_count = $manual_amount + $user_votes;
return $points_count;
}
I’d appreciate your help
0
4 months
0 Answers
21 views
0
Leave an answer
You must login or register to add a new answer .