Skip to content

Commit b510ab1

Browse files
Girgiasjorgsowa
authored andcommitted
Use known length
1 parent 91a5028 commit b510ab1

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
@@ -2007,13 +2007,13 @@ PHP_FUNCTION(session_get_cookie_params)
20072007
add_assoc_long(return_value, "lifetime", PS(cookie_lifetime));
20082008
// TODO Use add_assoc_str() but figure out why it emits a
20092009
// Zend/zend_types.h:1222: zend_gc_delref: Assertion `(zval_gc_flags((p)->u.type_info) & ((1<<7)|(1<<8))) != (1<<7)' failed.
2010-
add_assoc_string(return_value, "path", ZSTR_VAL(PS(cookie_path)));
2011-
add_assoc_string(return_value, "domain", ZSTR_VAL(PS(cookie_domain)));
2010+
add_assoc_stringl(return_value, "path", ZSTR_VAL(PS(cookie_path)), ZSTR_LEN(PS(cookie_path)));
2011+
add_assoc_stringl(return_value, "domain", ZSTR_VAL(PS(cookie_domain)), ZSTR_LEN(PS(cookie_domain)));
20122012
add_assoc_bool(return_value, "secure", PS(cookie_secure));
20132013
add_assoc_bool(return_value, "httponly", PS(cookie_httponly));
20142014
// TODO Use add_assoc_str() but figure out why it emits a
20152015
// Zend/zend_types.h:1222: zend_gc_delref: Assertion `(zval_gc_flags((p)->u.type_info) & ((1<<7)|(1<<8))) != (1<<7)' failed.
2016-
add_assoc_string(return_value, "samesite", ZSTR_VAL(PS(cookie_samesite)));
2016+
add_assoc_stringl(return_value, "samesite", ZSTR_VAL(PS(cookie_samesite)), ZSTR_LEN(PS(cookie_samesite)));
20172017
}
20182018
/* }}} */
20192019

0 commit comments

Comments
 (0)