Skip to content

Commit f9e3e29

Browse files
committed
Use known length
1 parent c8f0235 commit f9e3e29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/session/session.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,13 +1871,13 @@ PHP_FUNCTION(session_get_cookie_params)
18711871
add_assoc_long(return_value, "lifetime", PS(cookie_lifetime));
18721872
// TODO Use add_assoc_str() but figure out why it emits a
18731873
// Zend/zend_types.h:1222: zend_gc_delref: Assertion `(zval_gc_flags((p)->u.type_info) & ((1<<7)|(1<<8))) != (1<<7)' failed.
1874-
add_assoc_string(return_value, "path", ZSTR_VAL(PS(cookie_path)));
1875-
add_assoc_string(return_value, "domain", ZSTR_VAL(PS(cookie_domain)));
1874+
add_assoc_stringl(return_value, "path", ZSTR_VAL(PS(cookie_path)), ZSTR_LEN(PS(cookie_path)));
1875+
add_assoc_stringl(return_value, "domain", ZSTR_VAL(PS(cookie_domain)), ZSTR_LEN(PS(cookie_domain)));
18761876
add_assoc_bool(return_value, "secure", PS(cookie_secure));
18771877
add_assoc_bool(return_value, "httponly", PS(cookie_httponly));
18781878
// TODO Use add_assoc_str() but figure out why it emits a
18791879
// Zend/zend_types.h:1222: zend_gc_delref: Assertion `(zval_gc_flags((p)->u.type_info) & ((1<<7)|(1<<8))) != (1<<7)' failed.
1880-
add_assoc_string(return_value, "samesite", ZSTR_VAL(PS(cookie_samesite)));
1880+
add_assoc_stringl(return_value, "samesite", ZSTR_VAL(PS(cookie_samesite)), ZSTR_LEN(PS(cookie_samesite)));
18811881
}
18821882
/* }}} */
18831883

0 commit comments

Comments
 (0)