2009-10-06, 09:45 PM
when I attempt to merge users in MyBB 1.4.9, PHP 5.2.9, pgsql 8.3.7, I'm getting the following error:
MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
22P02 - ERROR: invalid input syntax for integer: ""
Query:
UPDATE mybb_users SET reputation='' WHERE uid='34'
Extra:
looks to -me- like the error is in admin/modules/user/users.php line 1525-1527,
and adding htis line in the middle seems to fix it.
I'd have filed this as a bug report, but I can't seem to get authenticated on the new bug reporter.
Note, my forum doesn't use reputations at all, so I dunno if '0' is the right value for 'none'.
MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
22P02 - ERROR: invalid input syntax for integer: ""
Query:
UPDATE mybb_users SET reputation='' WHERE uid='34'
Extra:
looks to -me- like the error is in admin/modules/user/users.php line 1525-1527,
$total_reputation = $db->fetch_field($query, "total_rep");
$db->update_query("users", array('reputation' => $total_reputation), "uid='{$destination_user['uid']}'");
and adding htis line in the middle seems to fix it.
if($total_reputation == '') $total_reputation='0';
I'd have filed this as a bug report, but I can't seem to get authenticated on the new bug reporter.
Note, my forum doesn't use reputations at all, so I dunno if '0' is the right value for 'none'.