Fix non-numeric errors in PHP 7.1

This commit is contained in:
Brian Miyaji
2017-01-15 10:01:25 +11:00
parent 896741ccb8
commit da12f410fb
6 changed files with 31 additions and 10 deletions

View File

@@ -259,6 +259,9 @@ class SP_Team extends SP_Custom_Post {
endforeach;
else:
$value = floatval( $value );
if ( array_key_exists( $key . 'for', $totals ) ):
$totals[ $key . 'for' ] += $value;
$totals[ $key . 'for' . ( $e + 1 ) ] = $value;
@@ -278,6 +281,9 @@ class SP_Team extends SP_Custom_Post {
endif;
else:
if ( $key != 'outcome' ):
$value = floatval( $value );
if ( array_key_exists( $key . 'against', $totals ) ):
$totals[ $key . 'against' ] += $value;
$totals[ $key . 'against' . ( $e + 1 ) ] = $value;