Active
Project:
Drupal core
Version:
main
Component:
database system
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2024 at 17:37 UTC
Updated:
17 May 2026 at 23:52 UTC
Jump to comment: Most recent
Currently depending upon how a database connection is configured the following scenarios may occur:
Neither of these methods is guaranteed to match the intended use of the result.
N/A
All new uses of the database must explicitly cast to expected type when the record is retrieved/used
None
None
None
None
Comments
Comment #2
cmlaraNever linked the related issue that describes the underlying database issue.
#3224245: Open MySQL connection using \PDO::ATTR_STRINGIFY_FETCHES can (last I looked) be overridden by supplying custom connection option.
Comment #3
solideogloria commentedComment #5
donquixote commentedDisabling the \PDO::ATTR_STRINGIFY_FETCHES setting seems preferable over manually casting values.
But from what I understand, different database engines might return differently typed values.