diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-03 09:40:07 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-03 09:40:07 +0100 |
commit | cb009b12a54c3dbb0e10b79c6ca77db8736d55b9 (patch) | |
tree | 7dba51dc6a8810fc2afcd4ca69a56253fd158533 /ext | |
parent | 73596c56e7905ce5b7c4f15d551361ee744cad0c (diff) | |
download | php-git-cb009b12a54c3dbb0e10b79c6ca77db8736d55b9.tar.gz |
Fixed bug #77273
Diffstat (limited to 'ext')
-rw-r--r-- | ext/pdo/pdo_dbh.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 4a372a9c18..314c845ac4 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -273,7 +273,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 */ @@ -386,6 +386,7 @@ options: if (str_key) { continue; } + ZVAL_DEREF(attr_value); pdo_dbh_attribute_set(dbh, long_key, attr_value); } ZEND_HASH_FOREACH_END(); } |