Skip to content

Commit 349dbb7

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
2 parents 325a113 + cb009b1 commit 349dbb7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ PHP NEWS
2929
- PCRE:
3030
. Fixed bug #77338 (get_browser with empty string). (Nikita)
3131

32+
- PDO:
33+
. Fixed bug #77273 (array_walk_recursive corrupts value types leading to PDO
34+
failure). (Nikita)
35+
3236
- Sockets:
3337
. Fixed bug #76839 (socket_recvfrom may return an invalid 'from' address
3438
on MacOS). (Michael Meyer)

ext/pdo/pdo_dbh.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ static PHP_METHOD(PDO, dbh_constructor)
271271
pdo_dbh_t *pdbh = NULL;
272272
zval *v;
273273

274-
if ((v = zend_hash_index_find(Z_ARRVAL_P(options), PDO_ATTR_PERSISTENT)) != NULL) {
274+
if ((v = zend_hash_index_find_deref(Z_ARRVAL_P(options), PDO_ATTR_PERSISTENT)) != NULL) {
275275
if (Z_TYPE_P(v) == IS_STRING &&
276276
!is_numeric_string(Z_STRVAL_P(v), Z_STRLEN_P(v), NULL, NULL, 0) && Z_STRLEN_P(v) > 0) {
277277
/* user specified key */
@@ -377,6 +377,7 @@ static PHP_METHOD(PDO, dbh_constructor)
377377
if (str_key) {
378378
continue;
379379
}
380+
ZVAL_DEREF(attr_value);
380381
pdo_dbh_attribute_set(dbh, long_key, attr_value);
381382
} ZEND_HASH_FOREACH_END();
382383
}

0 commit comments

Comments
 (0)