'Warning: A non-numeric value encountered wordpress theme

hey i just took over an old wordpress website and it has a lot of issues than i am trying to fix... I encountered this error:

Warning: A non-numeric value encountered in /wp-content/themes/citygov/fw/core/core.reviews.php on line 210

and this is the code:

202  // Prepare rating marks to display
203  if ( !function_exists( 'citygov_reviews_marks_to_display' ) ) {
204 function citygov_reviews_marks_to_display($marks) {
205     $max_level = max(5, (int) citygov_get_custom_option('reviews_max_level'));
206     if ($max_level == 100) return $marks;
207     $m = explode(',', $marks);
208     $kol = count($m);
209     for ($i=0; $i < $kol; $i++) {
210         $m[$i] = round($m[$i] / 100 * $max_level, 1);
211     }
212     return implode(',', $m);
213 }

I dont really know how to fix it please help :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source