diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-03 09:40:14 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-03 09:40:42 +0100 |
commit | 349dbb7938148226635ab8a59ca13bca75b255f9 (patch) | |
tree | 410660aa287512232536b6fce20c46b405a05d75 | |
parent | 325a1139744413420a62d3006c04914587628810 (diff) | |
parent | cb009b12a54c3dbb0e10b79c6ca77db8736d55b9 (diff) | |
download | php-git-349dbb7938148226635ab8a59ca13bca75b255f9.tar.gz |
Merge branch 'PHP-7.2' into PHP-7.3
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | ext/pdo/pdo_dbh.c | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -29,6 +29,10 @@ PHP NEWS - PCRE: . Fixed bug #77338 (get_browser with empty string). (Nikita) +- PDO: + . Fixed bug #77273 (array_walk_recursive corrupts value types leading to PDO + failure). (Nikita) + - Sockets: . Fixed bug #76839 (socket_recvfrom may return an invalid 'from' address on MacOS). (Michael Meyer) diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 8d2286812a..2c92c50edf 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -271,7 +271,7 @@ static PHP_METHOD(PDO, dbh_constructor) pdo_dbh_t *pdbh = NULL; zval *v; - if ((v = zend_hash_index_find(Z_ARRVAL_P(options), PDO_ATTR_PERSISTENT)) != NULL) { + if ((v = zend_hash_index_find_deref(Z_ARRVAL_P(options), PDO_ATTR_PERSISTENT)) != NULL) { if (Z_TYPE_P(v) == IS_STRING && !is_numeric_string(Z_STRVAL_P(v), Z_STRLEN_P(v), NULL, NULL, 0) && Z_STRLEN_P(v) > 0) { /* user specified key */ @@ -377,6 +377,7 @@ options: if (str_key) { continue; } + ZVAL_DEREF(attr_value); pdo_dbh_attribute_set(dbh, long_key, attr_value); } ZEND_HASH_FOREACH_END(); } |