Skip to content

Commit a124236

Browse files
committed
Review comments
1 parent f43439a commit a124236

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
@@ -825,7 +825,7 @@ static PHP_INI_MH(OnUpdateRefererCheck)
825825
{
826826
SESSION_CHECK_ACTIVE_STATE;
827827
SESSION_CHECK_OUTPUT_STATE;
828-
if (strcmp("", ZSTR_VAL(new_value)) != 0) {
828+
if (ZSTR_LEN(new_value) != 0) {
829829
php_error_docref(NULL, E_DEPRECATED, "Usage of session.referer_check INI setting is deprecated");
830830
}
831831
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 int php_ini_on_update_tags(zend_ini_entry *entry, zend_string *new_value,
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, 1);
@@ -155,7 +155,7 @@ static int php_ini_on_update_hosts(zend_ini_entry *entry, zend_string *new_value
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, 1);

0 commit comments

Comments
 (0)