Skip to content

Commit a7530e7

Browse files
committed
Review comments
1 parent 76bd982 commit a7530e7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ext/session/session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ static PHP_INI_MH(OnUpdateRefererCheck)
836836
{
837837
SESSION_CHECK_ACTIVE_STATE;
838838
SESSION_CHECK_OUTPUT_STATE;
839-
if (strcmp("", ZSTR_VAL(new_value)) != 0) {
839+
if (ZSTR_LEN(new_value) != 0) {
840840
php_error_docref(NULL, E_DEPRECATED, "Usage of session.referer_check INI setting is deprecated");
841841
}
842842
return OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage);

ext/session/tests/deprecations.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ Deprecated: session_start(): Disabling session.use_only_cookies INI setting is d
6161
Deprecated: session_start(): Enabling session.use_trans_sid INI setting is deprecated in %s on line 32
6262

6363
Deprecated: Constant SID is deprecated in %s on line 34
64-
PHPSESSID=%s
64+
PHPSESSID=%s

ext/standard/url_scanner_ex.re

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static zend_result php_ini_on_update_tags(zend_ini_entry *entry, zend_string *ne
102102

103103
static PHP_INI_MH(OnUpdateSessionTags)
104104
{
105-
if (strcmp("a=href,area=href,frame=src,form=", ZSTR_VAL(new_value)) != 0) {
105+
if (!zend_string_starts_with_literal(new_value, "a=href,area=href,frame=src,form=")) {
106106
php_error_docref(NULL, E_DEPRECATED, "Usage of session.trans_sid_tags INI setting is deprecated");
107107
}
108108
return php_ini_on_update_tags(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, /* is_session */ true);
@@ -155,7 +155,7 @@ static zend_result php_ini_on_update_hosts(zend_ini_entry *entry, zend_string *n
155155

156156
static PHP_INI_MH(OnUpdateSessionHosts)
157157
{
158-
if (strcmp("", ZSTR_VAL(new_value)) != 0) {
158+
if (ZSTR_LEN(new_value) != 0) {
159159
php_error_docref(NULL, E_DEPRECATED, "Usage of session.trans_sid_hosts INI setting is deprecated");
160160
}
161161
return php_ini_on_update_hosts(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage, /* is_session */ true);

0 commit comments

Comments
 (0)