Skip to content

Commit 043a11c

Browse files
committed
Merge branch 'PHP-7.3'
2 parents fe359cf + 349dbb7 commit 043a11c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/pdo/pdo_dbh.c

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

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

0 commit comments

Comments
 (0)