Skip to content

Commit d78d31f

Browse files
committed
Fixed PDO::getAttribute() to get PDO::ATTR_STRINGIFY_FETCHES
1 parent 7585cf6 commit d78d31f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Diff for: 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
}

Diff for: 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)

Diff for: 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)