Skip to content

Commit c3f6579

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix GH-12969: Fixed PDO::getAttribute() to get PDO::ATTR_STRINGIFY_FETCHES
2 parents a2068ef + b333164 commit c3f6579

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ PHP NEWS
3838
. Fixed bug GH-12987 (openssl_csr_sign might leak new cert on error).
3939
(Jakub Zelenka)
4040

41+
- PDO:
42+
. Fix GH-12969 (Fixed PDO::getAttribute() to get PDO::ATTR_STRINGIFY_FETCHES).
43+
(SakiTakamachi)
44+
4145
- PDO_ODBC:
4246
. Fixed bug GH-12767 (Unable to turn on autocommit mode with setAttribute()).
4347
(SakiTakamachi)

ext/pdo/pdo_dbh.c

+5
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,13 @@ PHP_METHOD(PDO, getAttribute)
930930
add_next_index_zval(return_value, &dbh->def_stmt_ctor_args);
931931
}
932932
return;
933+
933934
case PDO_ATTR_DEFAULT_FETCH_MODE:
934935
RETURN_LONG(dbh->default_fetch_type);
936+
937+
case PDO_ATTR_STRINGIFY_FETCHES:
938+
RETURN_BOOL(dbh->stringify);
939+
935940
default:
936941
break;
937942
}

ext/pdo_mysql/tests/bug68371.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,6 @@ array(1) {
9696
ERR
9797
ERR
9898
string(5) "mysql"
99-
ERR
99+
bool(false)
100100
ERR
101101
int(4)

ext/pdo_pgsql/tests/bug68371.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,6 @@ array(1) {
9595
ERR
9696
ERR
9797
string(5) "pgsql"
98-
ERR
98+
bool(true)
9999
ERR
100100
int(4)

0 commit comments

Comments
 (0)