diff -u b/core/modules/comment/comment.module b/core/modules/comment/comment.module --- b/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1056,8 +1056,8 @@ */ function comment_cron() { // Store the maximum possible comments per thread (used for node search - // ranking by reply count). Make sure it is a float value. - \Drupal::state()->set('comment.node_comment_statistics_scale', 1.0 / max(1.0, (float) db_query('SELECT MAX(comment_count) FROM {comment_entity_statistics}')->fetchField())); + // ranking by reply count). + \Drupal::state()->set('comment.node_comment_statistics_scale', 1.0 / max(1.0, db_query('SELECT MAX(comment_count) FROM {comment_entity_statistics}')->fetchField())); } /** diff -u b/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module --- b/core/modules/statistics/statistics.module +++ b/core/modules/statistics/statistics.module @@ -119,9 +119,8 @@ \Drupal::state()->set('statistics.day_timestamp', REQUEST_TIME); } - // Calculate the maximum of node views, for node search ranking. Make sure - // it is a float value. - \Drupal::state()->set('statistics.node_counter_scale', 1.0 / max(1.0, (float) db_query('SELECT MAX(totalcount) FROM {node_counter}')->fetchField())); + // Calculate the maximum of node views, for node search ranking. + \Drupal::state()->set('statistics.node_counter_scale', 1.0 / max(1.0, db_query('SELECT MAX(totalcount) FROM {node_counter}')->fetchField())); } /**