Hi there...thats useful to know...
The later PHP is more strict about numbers and probably doesnt like doing a maths operation on a string however i wouldnt have thought the minus sign would be a problem
Can you try this first ... can you place some extra lines in there so that block looks like this.. this will bomb out if either of the columns being totalled is not a number
if ( !is_numeric($col->old_column_value) )
$col->old_column_value = 0;
if ($col->old_column_value && !$col->reset_flag) {
if ( $col->column_value && !is_numeric($col->column_value) ){
echo "column not a number $col->query_name $col->column_value $v <BR>";
die;
}
if ( !is_numeric($col->old_column_value) ){
echo "old column not a number $col->query_name $col->old_column_value $v <BR>";
die;
}
$result =
$col->old_column_value +
str_replace(",", "", $col->column_value);
}
Hopefully that will print an error of the number thats having a problem .. i hope i got the syntax right.
Secondly you could try to avaoind the str_replace ( that is basically allowing you to sum numbers with commas in them e.g. 1,000,000 ..
try instead of those 3 lines the following :-
$result =
$col->old_column_value +
$col->column_value;
or force the result of the str_replace to a number
$result =
$col->old_column_value +
(int)str_replace(",", "", $col->column_value);