This commit is contained in:
Nikita Popov 2019-01-03 09:40:07 +01:00
parent 73596c56e7
commit cb009b12a5
2 changed files with 6 additions and 1 deletions

4
NEWS
View file

@ -9,6 +9,10 @@ PHP NEWS
. Fixed bug #75684 (In mysqlnd_ext_plugin.h the plugin methods family has
no external visibility). (Anatol)
- 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)

View file

@ -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();
}