Skip to content

Commit 264d17b

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

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ext/pdo/pdo_dbh.c

Lines changed: 5 additions & 0 deletions
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_pgsql/tests/bug68371.phpt

Lines changed: 1 addition & 1 deletion
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)