summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-01-03 09:40:07 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-01-03 09:40:07 +0100
commitcb009b12a54c3dbb0e10b79c6ca77db8736d55b9 (patch)
tree7dba51dc6a8810fc2afcd4ca69a56253fd158533 /ext
parent73596c56e7905ce5b7c4f15d551361ee744cad0c (diff)
downloadphp-git-cb009b12a54c3dbb0e10b79c6ca77db8736d55b9.tar.gz
Fixed bug #77273
Diffstat (limited to 'ext')
-rw-r--r--ext/pdo/pdo_dbh.c3
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();
}