Getting the following error when user logs in on a drupal installation using PostgreSQL for the database.

PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "" LINE 1: SELECT * from userpoints_txn WHERE txn_id = '' ^: SELECT * from {userpoints_txn} WHERE txn_id = :txn; Array ( [:txn] => ) in userpoints_transaction_load() (line 1853 of .../modules/userpoints/userpoints.module).

Drupal turns empty values into strings which PostgreSQL will not allow.

Comments

nickl’s picture

Status: Active » Needs review
StatusFileSize
new623 bytes

This patch will fix that...

Status: Needs review » Needs work

The last submitted patch, userpoints-postgresql_error_trans_load-1446528-1.patch, failed testing.

nickl’s picture

tisc tisc.. this one should pass the tests

berdir’s picture

Status: Needs work » Needs review
berdir’s picture

Status: Needs review » Fixed

There's a core issue about dealing with this in directly in entity_load() but that's been lying around for month.

Thanks for the patch, commited to 7.x-1.x, 7.x-2.x shouldn't be affected by this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.