Skip to content

Commit a573791

Browse files
committed
apply @alecpl suggestion
1 parent 653bc64 commit a573791

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

ext/mysqlnd/mysqlnd_connection.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,12 +1573,10 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_client_option_2d)(MYSQLND_CONN_DATA * cons
15731573
zend_string *str;
15741574

15751575
str = zend_string_init(key, strlen(key), conn->persistent);
1576+
ZVAL_NEW_STR(&attrz, zend_string_init(value, strlen(value), conn->persistent));
15761577
if (conn->persistent) {
15771578
GC_MAKE_PERSISTENT_LOCAL(str);
1578-
ZVAL_NEW_STR(&attrz, zend_string_init(value, strlen(value), 1));
15791579
GC_MAKE_PERSISTENT_LOCAL(Z_COUNTED(attrz));
1580-
} else {
1581-
ZVAL_NEW_STR(&attrz, zend_string_init(value, strlen(value), 0));
15821580
}
15831581
zend_hash_update(conn->options->connect_attr, str, &attrz);
15841582
zend_string_release_ex(str, conn->persistent);

0 commit comments

Comments
 (0)