Skip to content

Commit dd16fea

Browse files
committed
Merge branch 'PHP-7.1'
* PHP-7.1: Remove leftover of previous change
2 parents eefe3ec + 1eb4851 commit dd16fea

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

ext/session/session.c

+3-13
Original file line numberDiff line numberDiff line change
@@ -830,12 +830,10 @@ PS_SERIALIZER_DECODE_FUNC(php_binary) /* {{{ */
830830
int namelen;
831831
zend_string *name;
832832
php_unserialize_data_t var_hash;
833-
int skip = 0;
834833

835834
PHP_VAR_UNSERIALIZE_INIT(var_hash);
836835

837836
for (p = val; p < endptr; ) {
838-
skip = 0;
839837
namelen = ((unsigned char)(*p)) & (~PS_BIN_UNDEF);
840838

841839
if (namelen < 0 || namelen > PS_BIN_MAX || (p + namelen) >= endptr) {
@@ -854,9 +852,7 @@ PS_SERIALIZER_DECODE_FUNC(php_binary) /* {{{ */
854852
current = var_tmp_var(&var_hash);
855853
if (php_var_unserialize(current, (const unsigned char **) &p, (const unsigned char *) endptr, &var_hash)) {
856854
ZVAL_PTR(&rv, current);
857-
if (!skip) {
858-
php_set_session_var(name, &rv, &var_hash);
859-
}
855+
php_set_session_var(name, &rv, &var_hash);
860856
} else {
861857
zend_string_release(name);
862858
php_session_normalize_vars();
@@ -918,15 +914,13 @@ PS_SERIALIZER_DECODE_FUNC(php) /* {{{ */
918914
zend_string *name;
919915
int has_value, retval = SUCCESS;
920916
php_unserialize_data_t var_hash;
921-
int skip = 0;
922917

923918
PHP_VAR_UNSERIALIZE_INIT(var_hash);
924919

925920
p = val;
926921

927922
while (p < endptr) {
928923
q = p;
929-
skip = 0;
930924
while (*q != PS_DELIMITER) {
931925
if (++q >= endptr) goto break_outer_loop;
932926
}
@@ -946,18 +940,14 @@ PS_SERIALIZER_DECODE_FUNC(php) /* {{{ */
946940
current = var_tmp_var(&var_hash);
947941
if (php_var_unserialize(current, (const unsigned char **)&q, (const unsigned char *)endptr, &var_hash)) {
948942
ZVAL_PTR(&rv, current);
949-
if (!skip) {
950-
php_set_session_var(name, &rv, &var_hash);
951-
}
943+
php_set_session_var(name, &rv, &var_hash);
952944
} else {
953945
zend_string_release(name);
954946
retval = FAILURE;
955947
goto break_outer_loop;
956948
}
957949
} else {
958-
if(!skip) {
959-
PS_ADD_VARL(name);
960-
}
950+
PS_ADD_VARL(name);
961951
}
962952
zend_string_release(name);
963953

0 commit comments

Comments
 (0)