Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] [PostgreSQL] Warn User [C-Chris]
#1
Trying to warn a member when the forum is using PostgreSQL results in an error.

Reproduction Steps:

1. Go to a members profile
2. Click the "Warn" link
3. Enter an administrative note and select a warning type
4. Click "Warn User"

The following error is returned:

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
    22P02 - ERROR: invalid input syntax for integer: "" 
Query:
    INSERT INTO trunk_warnings (uid,tid,pid,title,points,dateline,issuedby,expires,expired,notes) VALUES ('2','1','','','2','1228664436','1','1229269236','0','Test') 

PostgreSQL 8.3.4
PHP: 5.2.6-2ubuntu4

#2
Change in warnings.php:
237: "tid" => $warning_type['tid'],
238: "pid" => $post['pid'],
to
237: "tid" => intval($warning_type['tid']),
238: "pid" => intval($post['pid']),

And run in psql:
ALTER TABLE mybb_warnings ALTER COLUMN revokereason SET DEFAULT '';
ALTER TABLE mybb_warnings ALTER COLUMN notes SET DEFAULT '';
MyBB 1.4.4
PHP: 5.2.6-pl7-gentoo
PostgreSQL 8.2.7
#3
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group


Forum Jump:


Users browsing this thread: 1 Guest(s)