Skip to content

Commit 1cbcb10

Browse files
committed
Fix RC violation of session SID constant deprecation attribute
Don't use persistent string/attribute for global constant, which only exists at runtime.
1 parent 7382895 commit 1cbcb10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/session/session.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,8 +1529,8 @@ PHPAPI zend_result php_session_reset_id(void)
15291529
}
15301530
}
15311531
if (new_sid_constant != NULL) {
1532-
zend_string *deprecation_reason = zend_string_init("as GET/POST sessions were deprecated", strlen("as GET/POST sessions were deprecated"), 1);
1533-
zend_attribute *deprecation_attrib = zend_add_global_constant_attribute(new_sid_constant, ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2);
1532+
zend_string *deprecation_reason = zend_string_init("as GET/POST sessions were deprecated", strlen("as GET/POST sessions were deprecated"), 0);
1533+
zend_attribute *deprecation_attrib = zend_add_attribute(&new_sid_constant->attributes, ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2, 0, 0, 0);
15341534
ZVAL_STR(&deprecation_attrib->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_4));
15351535
deprecation_attrib->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE);
15361536
ZVAL_STR(&deprecation_attrib->args[1].value, deprecation_reason);

0 commit comments

Comments
 (0)