Problem/Motivation
In #1003788: PostgreSQL: PDOException:Invalid text representation when attempting to load an entity with a string or non-scalar ID, we copied historical MySQL behavior to other DBMSes (such as PostgreSQL) by clearing out non-integer entity IDs in PHP instead of relying on the database to do this. We are still silently failing though, which may be OK on production but we should warn about this on development environments and in tests
Proposed resolution
In the original issue @catch asked for an exception (which never materialized), but we have assert() now so let's add an assert() that triggers whenever we find a non-integer entity ID that is supposed to be an integer.
Remaining tasks
Review patch
User interface changes
None.
API changes
None.
Beta evaluation:
Follow-up to a critical bug, so filing as major
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2564533-1.patch | 759 bytes | stefan.r |
Comments
Comment #2
stefan.r commentedTest case: https://3v4l.org/7dae2
Comment #4
catchDuplicate of #2356943: SqlContentEntityStorage::cleanIds() hides errors but please post the patch over there.