mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Fix GH-9971: Incorrect NUMERIC value returned from PDO_Firebird
Dialect 1 databases store and transfer `NUMERIC(15,2)` values as doubles, which we need to cater to in `firebird_stmt_get_col()` to avoid `ZEND_ASSUME(0)` to ever be triggered, since that may result in undefined behavior. Since adding a regression test would require to create a dialect 1 database, we go without it. Closes GH-10021.
This commit is contained in:
parent
bcc00304c7
commit
44377c3c70
4
NEWS
4
NEWS
@ -36,6 +36,10 @@ PHP NEWS
|
||||
. Fixed bug GH-9298 (Signal handler called after rshutdown leads to crash).
|
||||
(Erki Aring)
|
||||
|
||||
- PDO_Firebird:
|
||||
. Fixed bug GH-9971 (Incorrect NUMERIC value returned from PDO_Firebird).
|
||||
(cmb)
|
||||
|
||||
- Session:
|
||||
. Fixed GH-9932 (session name silently fails with . and [). (David Carlier)
|
||||
|
||||
|
@ -382,6 +382,8 @@ static int firebird_stmt_get_col(
|
||||
case SQL_INT64:
|
||||
n = *(ISC_INT64*)var->sqldata;
|
||||
break;
|
||||
case SQL_DOUBLE:
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user