I run a vBulletin plugin that has always worked fine until recently i upgraded Apache and PHP from 5.4 to 5.5 and suddonly a calculation isnt working the way it should do:
PHP Code:
$RUser = $row2['reputation'];
$RUserMinus = $RUser-1;
Instead of $RuserMinus being the result of $Ruser -1 it's replacing the value with -1 so $RUserMinus = "-1" instead of the result.
FULL SCRIPT
PHP Code:
$query2 = $db->query_read("SELECT reputation FROM user WHERE userid =" . $vbulletin->userinfo['userid']) or die(mysql_error());
while($row2 = mysql_fetch_array( $query2 )) {
$RUser = $row2['reputation'];
}
$RUserMinus = $RUser-1;
$vbulletin->db->query_write("UPDATE user SET reputation=".$RUserMinus." WHERE userid=".$vbulletin->userinfo['userid']) or die (mysql_error());
}