Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Fix GH-12969: Fixed PDO::getAttribute() to get PDO::ATTR_STRINGIFY_FETCHES
This commit is contained in:
Niels Dossche 2023-12-22 15:07:10 +01:00
commit c3f6579f93
4 changed files with 11 additions and 2 deletions

4
NEWS
View file

@ -38,6 +38,10 @@ PHP NEWS
. Fixed bug GH-12987 (openssl_csr_sign might leak new cert on error).
(Jakub Zelenka)
- PDO:
. Fix GH-12969 (Fixed PDO::getAttribute() to get PDO::ATTR_STRINGIFY_FETCHES).
(SakiTakamachi)
- PDO_ODBC:
. Fixed bug GH-12767 (Unable to turn on autocommit mode with setAttribute()).
(SakiTakamachi)

View file

@ -930,8 +930,13 @@ PHP_METHOD(PDO, getAttribute)
add_next_index_zval(return_value, &dbh->def_stmt_ctor_args);
}
return;
case PDO_ATTR_DEFAULT_FETCH_MODE:
RETURN_LONG(dbh->default_fetch_type);
case PDO_ATTR_STRINGIFY_FETCHES:
RETURN_BOOL(dbh->stringify);
default:
break;
}

View file

@ -96,6 +96,6 @@ array(1) {
ERR
ERR
string(5) "mysql"
ERR
bool(false)
ERR
int(4)

View file

@ -95,6 +95,6 @@ array(1) {
ERR
ERR
string(5) "pgsql"
ERR
bool(true)
ERR
int(4)