summaryrefslogtreecommitdiff
path: root/ext/session
diff options
context:
space:
mode:
Diffstat (limited to 'ext/session')
-rw-r--r--ext/session/config.m44
-rw-r--r--ext/session/config.w321
-rw-r--r--ext/session/mod_files.c6
-rw-r--r--ext/session/mod_files.h4
-rw-r--r--ext/session/mod_mm.c6
-rw-r--r--ext/session/mod_mm.h4
-rw-r--r--ext/session/mod_user.c4
-rw-r--r--ext/session/mod_user.h4
-rw-r--r--ext/session/mod_user_class.c2
-rw-r--r--ext/session/package.xml83
-rw-r--r--ext/session/php_session.h11
-rw-r--r--ext/session/session.c291
-rw-r--r--ext/session/tests/005.phpt2
-rw-r--r--ext/session/tests/006.phpt2
-rw-r--r--ext/session/tests/025.phpt7
-rw-r--r--ext/session/tests/026.phpt4
-rw-r--r--ext/session/tests/028.phpt16
-rw-r--r--ext/session/tests/030.phpt25
-rw-r--r--ext/session/tests/bug24592.phpt6
-rw-r--r--ext/session/tests/bug31454.phpt2
-rw-r--r--ext/session/tests/bug60634.phpt2
-rw-r--r--ext/session/tests/bug60860.phpt2
-rw-r--r--ext/session/tests/bug61470.phpt3
-rw-r--r--ext/session/tests/bug61728.phpt4
-rw-r--r--ext/session/tests/bug63379.phpt2
-rw-r--r--ext/session/tests/bug63379_nodestroy.phpt2
-rw-r--r--ext/session/tests/bug65475.phpt2
-rw-r--r--ext/session/tests/bug66481.phpt2
-rw-r--r--ext/session/tests/bug66827.phpt4
-rw-r--r--ext/session/tests/bug69111.phpt2
-rw-r--r--ext/session/tests/bug71603.phpt2
-rw-r--r--ext/session/tests/bug71974.phpt2
-rw-r--r--ext/session/tests/bug72940.phpt2
-rw-r--r--ext/session/tests/bug74541.phpt1
-rw-r--r--ext/session/tests/bug74833.phpt2
-rw-r--r--ext/session/tests/rfc1867.phpt12
-rw-r--r--ext/session/tests/rfc1867_cleanup.phpt12
-rw-r--r--ext/session/tests/rfc1867_disabled.phpt12
-rw-r--r--ext/session/tests/rfc1867_disabled_2.phpt12
-rw-r--r--ext/session/tests/rfc1867_inter.phpt12
-rw-r--r--ext/session/tests/rfc1867_invalid_settings.phpt2
-rw-r--r--ext/session/tests/rfc1867_invalid_settings_2.phpt2
-rw-r--r--ext/session/tests/rfc1867_no_name.phpt12
-rw-r--r--ext/session/tests/rfc1867_sid_cookie.phpt12
-rw-r--r--ext/session/tests/rfc1867_sid_get.phpt12
-rw-r--r--ext/session/tests/rfc1867_sid_get_2.phpt12
-rw-r--r--ext/session/tests/rfc1867_sid_invalid.phpt12
-rw-r--r--ext/session/tests/rfc1867_sid_only_cookie.phpt12
-rw-r--r--ext/session/tests/rfc1867_sid_only_cookie_2.phpt12
-rw-r--r--ext/session/tests/rfc1867_sid_post.phpt12
-rw-r--r--ext/session/tests/session_abort_basic.phpt2
-rw-r--r--ext/session/tests/session_cache_expire_basic.phpt6
-rw-r--r--ext/session/tests/session_cache_expire_error.phpt8
-rw-r--r--ext/session/tests/session_cache_expire_variation1.phpt6
-rw-r--r--ext/session/tests/session_cache_expire_variation2.phpt6
-rw-r--r--ext/session/tests/session_cache_expire_variation3.phpt6
-rw-r--r--ext/session/tests/session_cache_limiter_basic.phpt6
-rw-r--r--ext/session/tests/session_cache_limiter_error.phpt8
-rw-r--r--ext/session/tests/session_cache_limiter_variation1.phpt4
-rw-r--r--ext/session/tests/session_cache_limiter_variation2.phpt4
-rw-r--r--ext/session/tests/session_cache_limiter_variation3.phpt4
-rw-r--r--ext/session/tests/session_commit_basic.phpt6
-rw-r--r--ext/session/tests/session_commit_error.phpt8
-rw-r--r--ext/session/tests/session_commit_variation1.phpt6
-rw-r--r--ext/session/tests/session_commit_variation2.phpt6
-rw-r--r--ext/session/tests/session_commit_variation3.phpt6
-rw-r--r--ext/session/tests/session_commit_variation4.phpt2
-rw-r--r--ext/session/tests/session_decode_basic.phpt10
-rw-r--r--ext/session/tests/session_decode_basic_serialize.phpt10
-rw-r--r--ext/session/tests/session_decode_error.phpt8
-rw-r--r--ext/session/tests/session_decode_error2.phpt4
-rw-r--r--ext/session/tests/session_decode_variation1.phpt6
-rw-r--r--ext/session/tests/session_decode_variation2.phpt6
-rw-r--r--ext/session/tests/session_decode_variation3.phpt4
-rw-r--r--ext/session/tests/session_decode_variation4.phpt6
-rw-r--r--ext/session/tests/session_destroy_error.phpt8
-rw-r--r--ext/session/tests/session_destroy_variation1.phpt4
-rw-r--r--ext/session/tests/session_destroy_variation2.phpt6
-rw-r--r--ext/session/tests/session_destroy_variation3.phpt4
-rw-r--r--ext/session/tests/session_encode_basic.phpt8
-rw-r--r--ext/session/tests/session_encode_error.phpt8
-rw-r--r--ext/session/tests/session_encode_error2.phpt8
-rw-r--r--ext/session/tests/session_encode_serialize.phpt2
-rw-r--r--ext/session/tests/session_encode_variation1.phpt4
-rw-r--r--ext/session/tests/session_encode_variation2.phpt4
-rw-r--r--ext/session/tests/session_encode_variation3.phpt6
-rw-r--r--ext/session/tests/session_encode_variation4.phpt6
-rw-r--r--ext/session/tests/session_encode_variation5.phpt6
-rw-r--r--ext/session/tests/session_encode_variation6.phpt4
-rw-r--r--ext/session/tests/session_encode_variation7.phpt6
-rw-r--r--ext/session/tests/session_encode_variation8.phpt4
-rw-r--r--ext/session/tests/session_get_cookie_params_basic.phpt42
-rw-r--r--ext/session/tests/session_get_cookie_params_error.phpt8
-rw-r--r--ext/session/tests/session_get_cookie_params_variation1.phpt47
-rw-r--r--ext/session/tests/session_id_basic.phpt6
-rw-r--r--ext/session/tests/session_id_basic2.phpt4
-rw-r--r--ext/session/tests/session_id_error.phpt8
-rw-r--r--ext/session/tests/session_id_error2.phpt11
-rw-r--r--ext/session/tests/session_id_error3.phpt46
-rw-r--r--ext/session/tests/session_module_name_basic.phpt4
-rw-r--r--ext/session/tests/session_module_name_error.phpt8
-rw-r--r--ext/session/tests/session_module_name_variation1.phpt4
-rw-r--r--ext/session/tests/session_module_name_variation2.phpt4
-rw-r--r--ext/session/tests/session_module_name_variation3.phpt6
-rw-r--r--ext/session/tests/session_module_name_variation4.phpt6
-rw-r--r--ext/session/tests/session_name_basic.phpt6
-rw-r--r--ext/session/tests/session_name_error.phpt8
-rw-r--r--ext/session/tests/session_name_variation1.phpt4
-rw-r--r--ext/session/tests/session_name_variation2.phpt8
-rw-r--r--ext/session/tests/session_regenerate_id_basic.phpt6
-rw-r--r--ext/session/tests/session_regenerate_id_error.phpt14
-rw-r--r--ext/session/tests/session_regenerate_id_variation1.phpt6
-rw-r--r--ext/session/tests/session_reset_basic.phpt2
-rw-r--r--ext/session/tests/session_save_path_basic.phpt4
-rw-r--r--ext/session/tests/session_save_path_error.phpt8
-rw-r--r--ext/session/tests/session_save_path_variation2.phpt4
-rw-r--r--ext/session/tests/session_save_path_variation3.phpt4
-rw-r--r--ext/session/tests/session_save_path_variation4.phpt4
-rw-r--r--ext/session/tests/session_save_path_variation5.phpt6
-rw-r--r--ext/session/tests/session_set_cookie_params_basic.phpt4
-rw-r--r--ext/session/tests/session_set_cookie_params_error.phpt16
-rw-r--r--ext/session/tests/session_set_cookie_params_variation1.phpt4
-rw-r--r--ext/session/tests/session_set_cookie_params_variation2.phpt4
-rw-r--r--ext/session/tests/session_set_cookie_params_variation3.phpt4
-rw-r--r--ext/session/tests/session_set_cookie_params_variation4.phpt4
-rw-r--r--ext/session/tests/session_set_cookie_params_variation5.phpt4
-rw-r--r--ext/session/tests/session_set_cookie_params_variation6.phpt50
-rw-r--r--ext/session/tests/session_set_cookie_params_variation7.phpt71
-rw-r--r--ext/session/tests/session_set_save_handler_basic.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_class_001.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_class_002.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_class_003.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_class_004.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_class_005.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_class_006.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_class_007.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_class_008.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_class_009.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_class_010.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_class_011.phpt6
-rw-r--r--ext/session/tests/session_set_save_handler_class_012.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_class_013.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_class_014.phpt6
-rw-r--r--ext/session/tests/session_set_save_handler_class_015.phpt6
-rw-r--r--ext/session/tests/session_set_save_handler_class_017.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_closures.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_error.phpt8
-rw-r--r--ext/session/tests/session_set_save_handler_error2.phpt6
-rw-r--r--ext/session/tests/session_set_save_handler_error3.phpt6
-rw-r--r--ext/session/tests/session_set_save_handler_error4.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_iface_001.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_iface_002.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_iface_003.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_variation1.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_variation2.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_variation3.phpt4
-rw-r--r--ext/session/tests/session_set_save_handler_variation4.phpt6
-rw-r--r--ext/session/tests/session_start_error.phpt24
-rw-r--r--ext/session/tests/session_start_variation1.phpt4
-rw-r--r--ext/session/tests/session_start_variation2.phpt6
-rw-r--r--ext/session/tests/session_start_variation3.phpt4
-rw-r--r--ext/session/tests/session_start_variation4.phpt6
-rw-r--r--ext/session/tests/session_start_variation5.phpt6
-rw-r--r--ext/session/tests/session_start_variation6.phpt6
-rw-r--r--ext/session/tests/session_start_variation7.phpt6
-rw-r--r--ext/session/tests/session_start_variation8.phpt4
-rw-r--r--ext/session/tests/session_start_variation9.phpt4
-rw-r--r--ext/session/tests/session_status.phpt2
-rw-r--r--ext/session/tests/session_status_disabled.phpt2
-rw-r--r--ext/session/tests/session_unset_basic.phpt6
-rw-r--r--ext/session/tests/session_unset_error.phpt8
-rw-r--r--ext/session/tests/session_unset_variation1.phpt6
-rw-r--r--ext/session/tests/session_write_close_basic.phpt6
-rw-r--r--ext/session/tests/session_write_close_error.phpt8
-rw-r--r--ext/session/tests/session_write_close_variation1.phpt6
-rw-r--r--ext/session/tests/session_write_close_variation2.phpt6
-rw-r--r--ext/session/tests/session_write_close_variation3.phpt6
-rw-r--r--ext/session/tests/session_write_close_variation4.phpt6
-rw-r--r--ext/session/tests/sessionhandler_open_001.phpt2
179 files changed, 875 insertions, 754 deletions
diff --git a/ext/session/config.m4 b/ext/session/config.m4
index b33855a676..82e94342f3 100644
--- a/ext/session/config.m4
+++ b/ext/session/config.m4
@@ -1,6 +1,4 @@
-dnl
-dnl $Id$
-dnl
+dnl config.m4 for extension session
PHP_ARG_ENABLE(session, whether to enable PHP sessions,
[ --disable-session Disable session support], yes)
diff --git a/ext/session/config.w32 b/ext/session/config.w32
index 942f595da1..aff34f3c84 100644
--- a/ext/session/config.w32
+++ b/ext/session/config.w32
@@ -1,4 +1,3 @@
-// $Id$
// vim:ft=javascript
ARG_ENABLE("session", "session support", "yes");
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index b313d8bb65..cec67df148 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -100,7 +100,7 @@ typedef struct {
int fd;
} ps_files;
-ps_module ps_mod_files = {
+const ps_module ps_mod_files = {
/* New save handlers MUST use PS_MOD_UPDATE_TIMESTAMP macro */
PS_MOD_UPDATE_TIMESTAMP(files)
};
@@ -528,7 +528,7 @@ PS_READ_FUNC(files)
} else {
php_error_docref(NULL, E_WARNING, "read returned less bytes than requested");
}
- zend_string_release(*val);
+ zend_string_release_ex(*val, 0);
*val = ZSTR_EMPTY_ALLOC();
return FAILURE;
}
@@ -692,7 +692,7 @@ PS_CREATE_SID_FUNC(files)
/* FIXME: mod_data(data) should not be NULL (User handler could be NULL) */
if (data && ps_files_key_exists(data, ZSTR_VAL(sid)) == SUCCESS) {
if (sid) {
- zend_string_release(sid);
+ zend_string_release_ex(sid, 0);
sid = NULL;
}
if (--maxfail < 0) {
diff --git a/ext/session/mod_files.h b/ext/session/mod_files.h
index 7f894bffbc..ba1ca06788 100644
--- a/ext/session/mod_files.h
+++ b/ext/session/mod_files.h
@@ -16,12 +16,10 @@
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef MOD_FILES_H
#define MOD_FILES_H
-extern ps_module ps_mod_files;
+extern const ps_module ps_mod_files;
#define ps_files_ptr &ps_mod_files
PS_FUNCS_UPDATE_TIMESTAMP(files);
diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c
index 40fd5bdb71..3c1238d914 100644
--- a/ext/session/mod_mm.c
+++ b/ext/session/mod_mm.c
@@ -16,8 +16,6 @@
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#include "php.h"
#ifdef HAVE_LIBMM
@@ -219,7 +217,7 @@ static int ps_mm_key_exists(ps_mm *data, const char *key)
return FAILURE;
}
-ps_module ps_mod_mm = {
+const ps_module ps_mod_mm = {
PS_MOD_SID(mm)
};
@@ -482,7 +480,7 @@ PS_CREATE_SID_FUNC(mm)
/* Check collision */
if (ps_mm_key_exists(data, sid->val) == SUCCESS) {
if (sid) {
- zend_string_release(sid);
+ zend_string_release_ex(sid, 0);
sid = NULL;
}
if (!(maxfail--)) {
diff --git a/ext/session/mod_mm.h b/ext/session/mod_mm.h
index 653c955cdc..b01064766a 100644
--- a/ext/session/mod_mm.h
+++ b/ext/session/mod_mm.h
@@ -16,8 +16,6 @@
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef MOD_MM_H
#define MOD_MM_H
@@ -28,7 +26,7 @@
PHP_MINIT_FUNCTION(ps_mm);
PHP_MSHUTDOWN_FUNCTION(ps_mm);
-extern ps_module ps_mod_mm;
+extern const ps_module ps_mod_mm;
#define ps_mm_ptr &ps_mod_mm
PS_FUNCS(mm);
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c
index 9ab0be13cd..9f45eff3f9 100644
--- a/ext/session/mod_user.c
+++ b/ext/session/mod_user.c
@@ -16,13 +16,11 @@
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#include "php.h"
#include "php_session.h"
#include "mod_user.h"
-ps_module ps_mod_user = {
+const ps_module ps_mod_user = {
PS_MOD_UPDATE_TIMESTAMP(user)
};
diff --git a/ext/session/mod_user.h b/ext/session/mod_user.h
index f32d6aadce..8756554926 100644
--- a/ext/session/mod_user.h
+++ b/ext/session/mod_user.h
@@ -16,12 +16,10 @@
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef MOD_USER_H
#define MOD_USER_H
-extern ps_module ps_mod_user;
+extern const ps_module ps_mod_user;
#define ps_user_ptr &ps_mod_user
PS_FUNCS_UPDATE_TIMESTAMP(user);
diff --git a/ext/session/mod_user_class.c b/ext/session/mod_user_class.c
index 31488c194e..94c8f20a46 100644
--- a/ext/session/mod_user_class.c
+++ b/ext/session/mod_user_class.c
@@ -16,8 +16,6 @@
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#include "php.h"
#include "php_session.h"
diff --git a/ext/session/package.xml b/ext/session/package.xml
deleted file mode 100644
index bfca714e1a..0000000000
--- a/ext/session/package.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE package SYSTEM "../pear/package.dtd">
-<package>
- <name>session</name>
- <summary>Session handling functions</summary>
- <maintainers>
- <maintainer>
- <user>sascha</user>
- <name>Sascha Schumann</name>
- <email>sas@php.net</email>
- <role>lead</role>
- </maintainer>
- <maintainer>
- <user>andrei</user>
- <name>Andrei Zmievski</name>
- <email>andrei@php.net</email>
- <role>lead</role>
- </maintainer>
- </maintainers>
- <description>
-Session support in PHP consists of a way to preserve certain data
-across subsequent accesses. This enables you to build more customized
-applications and increase the appeal of your web site.
- </description>
- <license>PHP</license>
- <release>
- <state>beta</state>
- <version>5.0.0rc1</version>
- <date>2004-03-19</date>
- <notes>
-package.xml added to support installation using pear installer
- </notes>
- <filelist>
- <file role="doc" name="CREDITS"/>
- <file role="src" name="config.m4"/>
- <file role="src" name="config.w32"/>
- <file role="src" name="mod_files.c"/>
- <file role="src" name="mod_files.h"/>
- <file role="src" name="mod_files.sh"/>
- <file role="src" name="mod_mm.c"/>
- <file role="src" name="mod_mm.h"/>
- <file role="src" name="mod_user.c"/>
- <file role="src" name="mod_user_class.c"/>
- <file role="src" name="mod_user.h"/>
- <file role="src" name="php_session.h"/>
- <file role="src" name="session.c"/>
- <file role="test" name="tests/001.phpt"/>
- <file role="test" name="tests/002.phpt"/>
- <file role="test" name="tests/bug25745.phpt"/>
- <file role="test" name="tests/001.phpt"/>
- <file role="test" name="tests/002.phpt"/>
- <file role="test" name="tests/003.phpt"/>
- <file role="test" name="tests/004.phpt"/>
- <file role="test" name="tests/005.phpt"/>
- <file role="test" name="tests/006.phpt"/>
- <file role="test" name="tests/007.phpt"/>
- <file role="test" name="tests/008-php4.2.3.phpt"/>
- <file role="test" name="tests/008.phpt"/>
- <file role="test" name="tests/009.phpt"/>
- <file role="test" name="tests/010.phpt"/>
- <file role="test" name="tests/011.phpt"/>
- <file role="test" name="tests/012.phpt"/>
- <file role="test" name="tests/013.phpt"/>
- <file role="test" name="tests/014.phpt"/>
- <file role="test" name="tests/015.phpt"/>
- <file role="test" name="tests/016.phpt"/>
- <file role="test" name="tests/017.phpt"/>
- <file role="test" name="tests/018.phpt"/>
- <file role="test" name="tests/019.phpt"/>
- <file role="test" name="tests/020.phpt"/>
- <file role="test" name="tests/021.phpt"/>
- <file role="test" name="tests/skipif.inc"/>
- <file role="test" name="tests/bug26862.phpt"/>
- <file role="test" name="tests/bug24592.phpt"/>
- </filelist>
- <deps>
- <dep type="php" rel="ge" version="5" />
- </deps>
- </release>
-</package>
-<!--
-vim:et:ts=1:sw=1
--->
diff --git a/ext/session/php_session.h b/ext/session/php_session.h
index 6866570368..0119a79fce 100644
--- a/ext/session/php_session.h
+++ b/ext/session/php_session.h
@@ -16,8 +16,6 @@
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef PHP_SESSION_H
#define PHP_SESSION_H
@@ -157,8 +155,9 @@ typedef struct _php_ps_globals {
char *cookie_domain;
zend_bool cookie_secure;
zend_bool cookie_httponly;
- ps_module *mod;
- ps_module *default_mod;
+ char *cookie_samesite;
+ const ps_module *mod;
+ const ps_module *default_mod;
void *mod_data;
php_session_status session_status;
zend_long gc_probability;
@@ -260,7 +259,7 @@ PHPAPI void php_add_session_var(zend_string *name);
PHPAPI zval *php_set_session_var(zend_string *name, zval *state_val, php_unserialize_data_t *var_hash);
PHPAPI zval *php_get_session_var(zend_string *name);
-PHPAPI int php_session_register_module(ps_module *);
+PHPAPI int php_session_register_module(const ps_module *);
PHPAPI int php_session_register_serializer(const char *name,
zend_string *(*encode)(PS_SERIALIZER_ENCODE_ARGS),
@@ -270,7 +269,7 @@ PHPAPI void php_session_set_id(char *id);
PHPAPI int php_session_start(void);
PHPAPI int php_session_flush(int write);
-PHPAPI ps_module *_php_find_ps_module(char *name);
+PHPAPI const ps_module *_php_find_ps_module(char *name);
PHPAPI const ps_serializer *_php_find_ps_serializer(char *name);
PHPAPI int php_session_valid_key(const char *key);
diff --git a/ext/session/session.c b/ext/session/session.c
index dd54e6fed1..c46af0d87d 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -17,8 +17,6 @@
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -140,12 +138,12 @@ static inline void php_rshutdown_session_globals(void) /* {{{ */
} zend_end_try();
}
if (PS(id)) {
- zend_string_release(PS(id));
+ zend_string_release_ex(PS(id), 0);
PS(id) = NULL;
}
if (PS(session_vars)) {
- zend_string_release(PS(session_vars));
+ zend_string_release_ex(PS(session_vars), 0);
PS(session_vars) = NULL;
}
@@ -225,7 +223,7 @@ static void php_session_track_init(void) /* {{{ */
ZVAL_NEW_REF(&PS(http_session_vars), &session_vars);
Z_ADDREF_P(&PS(http_session_vars));
zend_hash_update_ind(&EG(symbol_table), var_name, &PS(http_session_vars));
- zend_string_release(var_name);
+ zend_string_release_ex(var_name, 0);
}
/* }}} */
@@ -268,12 +266,10 @@ static int php_session_decode(zend_string *data) /* {{{ */
static char hexconvtab[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,-";
-/* returns a pointer to the byte after the last valid character in out */
-static size_t bin_to_readable(unsigned char *in, size_t inlen, char *out, char nbits) /* {{{ */
+static void bin_to_readable(unsigned char *in, size_t inlen, char *out, size_t outlen, char nbits) /* {{{ */
{
unsigned char *p, *q;
unsigned short w;
- size_t len = inlen;
int mask;
int have;
@@ -284,16 +280,15 @@ static size_t bin_to_readable(unsigned char *in, size_t inlen, char *out, char n
have = 0;
mask = (1 << nbits) - 1;
- while (inlen--) {
+ while (outlen--) {
if (have < nbits) {
if (p < q) {
w |= *p++ << have;
have += 8;
} else {
- /* consumed everything? */
- if (have == 0) break;
- /* No? We need a final round */
- have = nbits;
+ /* Should never happen. Input must be large enough. */
+ ZEND_ASSERT(0);
+ break;
}
}
@@ -304,7 +299,6 @@ static size_t bin_to_readable(unsigned char *in, size_t inlen, char *out, char n
}
*out = '\0';
- return len;
}
/* }}} */
@@ -315,13 +309,18 @@ PHPAPI zend_string *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */
unsigned char rbuf[PS_MAX_SID_LENGTH + PS_EXTRA_RAND_BYTES];
zend_string *outid;
+ /* It would be enough to read ceil(sid_length * sid_bits_per_character / 8) bytes here.
+ * We read sid_length bytes instead for simplicity. */
/* Read additional PS_EXTRA_RAND_BYTES just in case CSPRNG is not safe enough */
if (php_random_bytes_throw(rbuf, PS(sid_length) + PS_EXTRA_RAND_BYTES) == FAILURE) {
return NULL;
}
outid = zend_string_alloc(PS(sid_length), 0);
- ZSTR_LEN(outid) = bin_to_readable(rbuf, PS(sid_length), ZSTR_VAL(outid), (char)PS(sid_bits_per_character));
+ bin_to_readable(
+ rbuf, PS(sid_length),
+ ZSTR_VAL(outid), ZSTR_LEN(outid),
+ (char)PS(sid_bits_per_character));
return outid;
}
@@ -405,7 +404,7 @@ static int php_session_initialize(void) /* {{{ */
/* If there is no ID, use session module to create one */
if (!PS(id) || !ZSTR_VAL(PS(id))[0]) {
if (PS(id)) {
- zend_string_release(PS(id));
+ zend_string_release_ex(PS(id), 0);
}
PS(id) = PS(mod)->s_create_sid(&PS(mod_data));
if (!PS(id)) {
@@ -419,7 +418,7 @@ static int php_session_initialize(void) /* {{{ */
} else if (PS(use_strict_mode) && PS(mod)->s_validate_sid &&
PS(mod)->s_validate_sid(&PS(mod_data), PS(id)) == FAILURE) {
if (PS(id)) {
- zend_string_release(PS(id));
+ zend_string_release_ex(PS(id), 0);
}
PS(id) = PS(mod)->s_create_sid(&PS(mod_data));
if (!PS(id)) {
@@ -448,7 +447,7 @@ static int php_session_initialize(void) /* {{{ */
php_session_gc(0);
if (PS(session_vars)) {
- zend_string_release(PS(session_vars));
+ zend_string_release_ex(PS(session_vars), 0);
PS(session_vars) = NULL;
}
if (val) {
@@ -456,7 +455,7 @@ static int php_session_initialize(void) /* {{{ */
PS(session_vars) = zend_string_copy(val);
}
php_session_decode(val);
- zend_string_release(val);
+ zend_string_release_ex(val, 0);
}
return SUCCESS;
}
@@ -483,7 +482,7 @@ static void php_session_save_current_state(int write) /* {{{ */
} else {
ret = PS(mod)->s_write(&PS(mod_data), PS(id), val, PS(gc_maxlifetime));
}
- zend_string_release(val);
+ zend_string_release_ex(val, 0);
} else {
ret = PS(mod)->s_write(&PS(mod_data), PS(id), ZSTR_EMPTY_ALLOC(), PS(gc_maxlifetime));
}
@@ -532,7 +531,7 @@ static void php_session_normalize_vars() /* {{{ */
static PHP_INI_MH(OnUpdateSaveHandler) /* {{{ */
{
- ps_module *tmp;
+ const ps_module *tmp;
SESSION_CHECK_ACTIVE_STATE;
SESSION_CHECK_OUTPUT_STATE;
@@ -770,7 +769,7 @@ static PHP_INI_MH(OnUpdateLazyWrite) /* {{{ */
static PHP_INI_MH(OnUpdateRfc1867Freq) /* {{{ */
{
int tmp;
- tmp = zend_atoi(ZSTR_VAL(new_value), (int)ZSTR_LEN(new_value));
+ tmp = zend_atoi(ZSTR_VAL(new_value), ZSTR_LEN(new_value));
if(tmp < 0) {
php_error_docref(NULL, E_WARNING, "session.upload_progress.freq must be greater than or equal to zero");
return FAILURE;
@@ -803,6 +802,7 @@ PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("session.cookie_domain", "", PHP_INI_ALL, OnUpdateSessionString, cookie_domain, php_ps_globals, ps_globals)
STD_PHP_INI_ENTRY("session.cookie_secure", "0", PHP_INI_ALL, OnUpdateSessionBool, cookie_secure, php_ps_globals, ps_globals)
STD_PHP_INI_ENTRY("session.cookie_httponly", "0", PHP_INI_ALL, OnUpdateSessionBool, cookie_httponly, php_ps_globals, ps_globals)
+ STD_PHP_INI_ENTRY("session.cookie_samesite", "", PHP_INI_ALL, OnUpdateString, cookie_samesite, php_ps_globals, ps_globals)
STD_PHP_INI_ENTRY("session.use_cookies", "1", PHP_INI_ALL, OnUpdateSessionBool, use_cookies, php_ps_globals, ps_globals)
STD_PHP_INI_ENTRY("session.use_only_cookies", "1", PHP_INI_ALL, OnUpdateSessionBool, use_only_cookies, php_ps_globals, ps_globals)
STD_PHP_INI_ENTRY("session.use_strict_mode", "0", PHP_INI_ALL, OnUpdateSessionBool, use_strict_mode, php_ps_globals, ps_globals)
@@ -876,7 +876,7 @@ PS_SERIALIZER_DECODE_FUNC(php_serialize) /* {{{ */
ZVAL_NEW_REF(&PS(http_session_vars), &session_vars);
Z_ADDREF_P(&PS(http_session_vars));
zend_hash_update_ind(&EG(symbol_table), var_name, &PS(http_session_vars));
- zend_string_release(var_name);
+ zend_string_release_ex(var_name, 0);
return SUCCESS;
}
/* }}} */
@@ -934,12 +934,12 @@ PS_SERIALIZER_DECODE_FUNC(php_binary) /* {{{ */
ZVAL_PTR(&rv, current);
php_set_session_var(name, &rv, &var_hash);
} else {
- zend_string_release(name);
+ zend_string_release_ex(name, 0);
php_session_normalize_vars();
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
return FAILURE;
}
- zend_string_release(name);
+ zend_string_release_ex(name, 0);
}
php_session_normalize_vars();
@@ -1006,11 +1006,11 @@ PS_SERIALIZER_DECODE_FUNC(php) /* {{{ */
ZVAL_PTR(&rv, current);
php_set_session_var(name, &rv, &var_hash);
} else {
- zend_string_release(name);
+ zend_string_release_ex(name, 0);
retval = FAILURE;
goto break_outer_loop;
}
- zend_string_release(name);
+ zend_string_release_ex(name, 0);
p = q;
}
@@ -1058,12 +1058,12 @@ PHPAPI int php_session_register_serializer(const char *name, zend_string *(*enco
#define MAX_MODULES 32
#define PREDEFINED_MODULES 2
-static ps_module *ps_modules[MAX_MODULES + 1] = {
+static const ps_module *ps_modules[MAX_MODULES + 1] = {
ps_files_ptr,
ps_user_ptr
};
-PHPAPI int php_session_register_module(ps_module *ptr) /* {{{ */
+PHPAPI int php_session_register_module(const ps_module *ptr) /* {{{ */
{
int ret = FAILURE;
int i;
@@ -1207,7 +1207,7 @@ CACHE_LIMITER_FUNC(nocache) /* {{{ */
}
/* }}} */
-static php_session_cache_limiter_t php_session_cache_limiters[] = {
+static const php_session_cache_limiter_t php_session_cache_limiters[] = {
CACHE_LIMITER_ENTRY(public)
CACHE_LIMITER_ENTRY(private)
CACHE_LIMITER_ENTRY(private_no_expire)
@@ -1217,7 +1217,7 @@ static php_session_cache_limiter_t php_session_cache_limiters[] = {
static int php_session_cache_limiter(void) /* {{{ */
{
- php_session_cache_limiter_t *lim;
+ const php_session_cache_limiter_t *lim;
if (PS(cache_limiter)[0] == '\0') return 0;
if (PS(session_status) != php_session_active) return -1;
@@ -1322,8 +1322,8 @@ static int php_session_send_cookie(void) /* {{{ */
smart_str_appendc(&ncookie, '=');
smart_str_appendl(&ncookie, ZSTR_VAL(e_id), ZSTR_LEN(e_id));
- zend_string_release(e_session_name);
- zend_string_release(e_id);
+ zend_string_release_ex(e_session_name, 0);
+ zend_string_release_ex(e_id, 0);
if (PS(cookie_lifetime) > 0) {
struct timeval tv;
@@ -1336,7 +1336,7 @@ static int php_session_send_cookie(void) /* {{{ */
date_fmt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, t, 0);
smart_str_appends(&ncookie, COOKIE_EXPIRES);
smart_str_appendl(&ncookie, ZSTR_VAL(date_fmt), ZSTR_LEN(date_fmt));
- zend_string_release(date_fmt);
+ zend_string_release_ex(date_fmt, 0);
smart_str_appends(&ncookie, COOKIE_MAX_AGE);
smart_str_append_long(&ncookie, PS(cookie_lifetime));
@@ -1361,6 +1361,11 @@ static int php_session_send_cookie(void) /* {{{ */
smart_str_appends(&ncookie, COOKIE_HTTPONLY);
}
+ if (PS(cookie_samesite)[0]) {
+ smart_str_appends(&ncookie, COOKIE_SAMESITE);
+ smart_str_appends(&ncookie, PS(cookie_samesite));
+ }
+
smart_str_0(&ncookie);
php_session_remove_cookie(); /* remove already sent session ID cookie */
@@ -1373,10 +1378,10 @@ static int php_session_send_cookie(void) /* {{{ */
}
/* }}} */
-PHPAPI ps_module *_php_find_ps_module(char *name) /* {{{ */
+PHPAPI const ps_module *_php_find_ps_module(char *name) /* {{{ */
{
- ps_module *ret = NULL;
- ps_module **mod;
+ const ps_module *ret = NULL;
+ const ps_module **mod;
int i;
for (i = 0, mod = ps_modules; i < MAX_MODULES; i++, mod++) {
@@ -1433,7 +1438,7 @@ PHPAPI int php_session_reset_id(void) /* {{{ */
}
/* If the SID constant exists, destroy it. */
- /* We must not delete any items in EG(zend_contants) */
+ /* We must not delete any items in EG(zend_constants) */
/* zend_hash_str_del(EG(zend_constants), "sid", sizeof("sid") - 1); */
sid = zend_get_constant_str("SID", sizeof("SID") - 1);
@@ -1445,7 +1450,7 @@ PHPAPI int php_session_reset_id(void) /* {{{ */
smart_str_appends(&var, ZSTR_VAL(PS(id)));
smart_str_0(&var);
if (sid) {
- zend_string_release(Z_STR_P(sid));
+ zval_ptr_dtor_str(sid);
ZVAL_NEW_STR(sid, var.s);
} else {
REGISTER_STRINGL_CONSTANT("SID", ZSTR_VAL(var.s), ZSTR_LEN(var.s), 0);
@@ -1453,7 +1458,7 @@ PHPAPI int php_session_reset_id(void) /* {{{ */
}
} else {
if (sid) {
- zend_string_release(Z_STR_P(sid));
+ zval_ptr_dtor_str(sid);
ZVAL_EMPTY_STRING(sid);
} else {
REGISTER_STRINGL_CONSTANT("SID", "", 0, 0);
@@ -1478,7 +1483,7 @@ PHPAPI int php_session_reset_id(void) /* {{{ */
zend_string *sname;
sname = zend_string_init(PS(session_name), strlen(PS(session_name)), 0);
php_url_scanner_reset_session_var(sname, 1); /* This may fail when session name has changed */
- zend_string_release(sname);
+ zend_string_release_ex(sname, 0);
php_url_scanner_add_session_var(PS(session_name), strlen(PS(session_name)), ZSTR_VAL(PS(id)), ZSTR_LEN(PS(id)), 1);
}
return SUCCESS;
@@ -1545,7 +1550,7 @@ PHPAPI int php_session_start(void) /* {{{ */
PS(define_sid) = 0;
}
}
- /* Initilize session ID from non cookie values */
+ /* Initialize session ID from non cookie values */
if (!PS(use_only_cookies)) {
if (!PS(id) && (data = zend_hash_str_find(&EG(symbol_table), "_GET", sizeof("_GET") - 1))) {
ZVAL_DEREF(data);
@@ -1583,7 +1588,7 @@ PHPAPI int php_session_start(void) /* {{{ */
Z_STRLEN_P(data) != 0 &&
strstr(Z_STRVAL_P(data), PS(extern_referer_chk)) == NULL
) {
- zend_string_release(PS(id));
+ zend_string_release_ex(PS(id), 0);
PS(id) = NULL;
}
}
@@ -1592,7 +1597,7 @@ PHPAPI int php_session_start(void) /* {{{ */
/* Finally check session id for dangerous characters
* Security note: session id may be embedded in HTML pages.*/
if (PS(id) && strpbrk(ZSTR_VAL(PS(id)), "\r\n\t <>'\"\\")) {
- zend_string_release(PS(id));
+ zend_string_release_ex(PS(id), 0);
PS(id) = NULL;
}
@@ -1600,7 +1605,7 @@ PHPAPI int php_session_start(void) /* {{{ */
|| php_session_cache_limiter() == -2) {
PS(session_status) = php_session_none;
if (PS(id)) {
- zend_string_release(PS(id));
+ zend_string_release_ex(PS(id), 0);
PS(id) = NULL;
}
return FAILURE;
@@ -1660,20 +1665,30 @@ PHPAPI void session_adapt_url(const char *url, size_t urllen, char **new, size_t
******************************** */
/* {{{ proto bool session_set_cookie_params(int lifetime [, string path [, string domain [, bool secure[, bool httponly]]]])
+ session_set_cookie_params(array options)
Set session cookie parameters */
static PHP_FUNCTION(session_set_cookie_params)
{
- zval *lifetime;
- zend_string *path = NULL, *domain = NULL;
- int argc = ZEND_NUM_ARGS();
- zend_bool secure = 0, httponly = 0;
+ zval *lifetime_or_options = NULL;
+ zend_string *lifetime = NULL, *path = NULL, *domain = NULL, *samesite = NULL;
+ zend_bool secure = 0, secure_null = 1;
+ zend_bool httponly = 0, httponly_null = 1;
zend_string *ini_name;
+ int result;
+ int found = 0;
- if (!PS(use_cookies) ||
- zend_parse_parameters(argc, "z|SSbb", &lifetime, &path, &domain, &secure, &httponly) == FAILURE) {
+ if (!PS(use_cookies)) {
return;
}
+ ZEND_PARSE_PARAMETERS_START(1, 5)
+ Z_PARAM_ZVAL(lifetime_or_options)
+ Z_PARAM_OPTIONAL
+ Z_PARAM_STR(path)
+ Z_PARAM_STR(domain)
+ Z_PARAM_BOOL_EX(secure, secure_null, 1, 0)
+ Z_PARAM_BOOL_EX(httponly, httponly_null, 1, 0)
+ ZEND_PARSE_PARAMETERS_END();
if (PS(session_status) == php_session_active) {
php_error_docref(NULL, E_WARNING, "Cannot change session cookie parameters when session is active");
@@ -1685,47 +1700,115 @@ static PHP_FUNCTION(session_set_cookie_params)
RETURN_FALSE;
}
- convert_to_string_ex(lifetime);
+ if (Z_TYPE_P(lifetime_or_options) == IS_ARRAY) {
+ zend_string *key;
+ zval *value;
- ini_name = zend_string_init("session.cookie_lifetime", sizeof("session.cookie_lifetime") - 1, 0);
- if (zend_alter_ini_entry(ini_name, Z_STR_P(lifetime), PHP_INI_USER, PHP_INI_STAGE_RUNTIME) == FAILURE) {
- zend_string_release(ini_name);
- RETURN_FALSE;
+ if (path) {
+ path = NULL;
+ domain = NULL;
+ secure_null = 1;
+ httponly_null = 1;
+ php_error_docref(NULL, E_WARNING, "Cannot pass arguments after the options array");
+ RETURN_FALSE;
+ }
+
+ ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(lifetime_or_options), key, value) {
+ if (key) {
+ ZVAL_DEREF(value);
+ if(!strcasecmp("lifetime", ZSTR_VAL(key))) {
+ lifetime = zval_get_string(value);
+ found++;
+ } else if(!strcasecmp("path", ZSTR_VAL(key))) {
+ path = zval_get_string(value);
+ found++;
+ } else if(!strcasecmp("domain", ZSTR_VAL(key))) {
+ domain = zval_get_string(value);
+ found++;
+ } else if(!strcasecmp("secure", ZSTR_VAL(key))) {
+ secure = zval_is_true(value);
+ secure_null = 0;
+ found++;
+ } else if(!strcasecmp("httponly", ZSTR_VAL(key))) {
+ httponly = zval_is_true(value);
+ httponly_null = 0;
+ found++;
+ } else if(!strcasecmp("samesite", ZSTR_VAL(key))) {
+ samesite = zval_get_string(value);
+ found++;
+ } else {
+ php_error_docref(NULL, E_WARNING, "Unrecognized key '%s' found in the options array", ZSTR_VAL(key));
+ }
+ } else {
+ php_error_docref(NULL, E_WARNING, "Numeric key found in the options array");
+ }
+ } ZEND_HASH_FOREACH_END();
+
+ if (found == 0) {
+ php_error_docref(NULL, E_WARNING, "No valid keys were found in the options array");
+ RETURN_FALSE;
+ }
+ } else {
+ lifetime = zval_get_string(lifetime_or_options);
}
- zend_string_release(ini_name);
+ if (lifetime) {
+ ini_name = zend_string_init("session.cookie_lifetime", sizeof("session.cookie_lifetime") - 1, 0);
+ result = zend_alter_ini_entry(ini_name, lifetime, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
+ zend_string_release(lifetime);
+ zend_string_release_ex(ini_name, 0);
+ if (result == FAILURE) {
+ RETURN_FALSE;
+ }
+ }
if (path) {
ini_name = zend_string_init("session.cookie_path", sizeof("session.cookie_path") - 1, 0);
- if (zend_alter_ini_entry(ini_name, path, PHP_INI_USER, PHP_INI_STAGE_RUNTIME) == FAILURE) {
- zend_string_release(ini_name);
+ result = zend_alter_ini_entry(ini_name, path, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
+ if (found > 0) {
+ zend_string_release(path);
+ }
+ zend_string_release_ex(ini_name, 0);
+ if (result == FAILURE) {
RETURN_FALSE;
}
- zend_string_release(ini_name);
}
if (domain) {
ini_name = zend_string_init("session.cookie_domain", sizeof("session.cookie_domain") - 1, 0);
- if (zend_alter_ini_entry(ini_name, domain, PHP_INI_USER, PHP_INI_STAGE_RUNTIME) == FAILURE) {
- zend_string_release(ini_name);
+ result = zend_alter_ini_entry(ini_name, domain, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
+ if (found > 0) {
+ zend_string_release(domain);
+ }
+ zend_string_release_ex(ini_name, 0);
+ if (result == FAILURE) {
RETURN_FALSE;
}
- zend_string_release(ini_name);
}
-
- if (argc > 3) {
+ if (!secure_null) {
ini_name = zend_string_init("session.cookie_secure", sizeof("session.cookie_secure") - 1, 0);
- if (zend_alter_ini_entry_chars(ini_name, secure ? "1" : "0", 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME) == FAILURE) {
- zend_string_release(ini_name);
+ result = zend_alter_ini_entry_chars(ini_name, secure ? "1" : "0", 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
+ zend_string_release_ex(ini_name, 0);
+ if (result == FAILURE) {
RETURN_FALSE;
}
- zend_string_release(ini_name);
}
- if (argc > 4) {
+ if (!httponly_null) {
ini_name = zend_string_init("session.cookie_httponly", sizeof("session.cookie_httponly") - 1, 0);
- if (zend_alter_ini_entry_chars(ini_name, httponly ? "1" : "0", 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME) == FAILURE) {
- zend_string_release(ini_name);
+ result = zend_alter_ini_entry_chars(ini_name, httponly ? "1" : "0", 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
+ zend_string_release_ex(ini_name, 0);
+ if (result == FAILURE) {
+ RETURN_FALSE;
+ }
+ }
+ if (samesite) {
+ ini_name = zend_string_init("session.cookie_samesite", sizeof("session.cookie_samesite") - 1, 0);
+ result = zend_alter_ini_entry(ini_name, samesite, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
+ if (found > 0) {
+ zend_string_release(samesite);
+ }
+ zend_string_release_ex(ini_name, 0);
+ if (result == FAILURE) {
RETURN_FALSE;
}
- zend_string_release(ini_name);
}
RETURN_TRUE;
@@ -1747,6 +1830,7 @@ static PHP_FUNCTION(session_get_cookie_params)
add_assoc_string(return_value, "domain", PS(cookie_domain));
add_assoc_bool(return_value, "secure", PS(cookie_secure));
add_assoc_bool(return_value, "httponly", PS(cookie_httponly));
+ add_assoc_string(return_value, "samesite", PS(cookie_samesite));
}
/* }}} */
@@ -1776,7 +1860,7 @@ static PHP_FUNCTION(session_name)
if (name) {
ini_name = zend_string_init("session.name", sizeof("session.name") - 1, 0);
zend_alter_ini_entry(ini_name, name, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
- zend_string_release(ini_name);
+ zend_string_release_ex(ini_name, 0);
}
}
/* }}} */
@@ -1813,7 +1897,7 @@ static PHP_FUNCTION(session_module_name)
if (!_php_find_ps_module(ZSTR_VAL(name))) {
php_error_docref(NULL, E_WARNING, "Cannot find named PHP session module (%s)", ZSTR_VAL(name));
- zval_dtor(return_value);
+ zval_ptr_dtor_str(return_value);
RETURN_FALSE;
}
if (PS(mod_data) || PS(mod_user_implemented)) {
@@ -1823,7 +1907,7 @@ static PHP_FUNCTION(session_module_name)
ini_name = zend_string_init("session.save_handler", sizeof("session.save_handler") - 1, 0);
zend_alter_ini_entry(ini_name, name, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
- zend_string_release(ini_name);
+ zend_string_release_ex(ini_name, 0);
}
}
/* }}} */
@@ -1942,8 +2026,8 @@ static PHP_FUNCTION(session_set_save_handler)
PS(set_handler) = 1;
zend_alter_ini_entry(ini_name, ini_val, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
PS(set_handler) = 0;
- zend_string_release(ini_val);
- zend_string_release(ini_name);
+ zend_string_release_ex(ini_val, 0);
+ zend_string_release_ex(ini_name, 0);
}
RETURN_TRUE;
@@ -1966,7 +2050,7 @@ static PHP_FUNCTION(session_set_save_handler)
if (!zend_is_callable(&args[i], 0, NULL)) {
zend_string *name = zend_get_callable_name(&args[i]);
php_error_docref(NULL, E_WARNING, "Argument %d is not a valid callback", i+1);
- zend_string_release(name);
+ zend_string_release_ex(name, 0);
RETURN_FALSE;
}
}
@@ -1977,8 +2061,8 @@ static PHP_FUNCTION(session_set_save_handler)
PS(set_handler) = 1;
zend_alter_ini_entry(ini_name, ini_val, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
PS(set_handler) = 0;
- zend_string_release(ini_val);
- zend_string_release(ini_name);
+ zend_string_release_ex(ini_val, 0);
+ zend_string_release_ex(ini_name, 0);
}
for (i = 0; i < argc; i++) {
@@ -2018,12 +2102,12 @@ static PHP_FUNCTION(session_save_path)
if (name) {
if (memchr(ZSTR_VAL(name), '\0', ZSTR_LEN(name)) != NULL) {
php_error_docref(NULL, E_WARNING, "The save_path cannot contain NULL characters");
- zval_dtor(return_value);
+ zval_ptr_dtor_str(return_value);
RETURN_FALSE;
}
ini_name = zend_string_init("session.save_path", sizeof("session.save_path") - 1, 0);
zend_alter_ini_entry(ini_name, name, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
- zend_string_release(ini_name);
+ zend_string_release_ex(ini_name, 0);
}
}
/* }}} */
@@ -2044,6 +2128,11 @@ static PHP_FUNCTION(session_id)
RETURN_FALSE;
}
+ if (name && PS(session_status) == php_session_active) {
+ php_error_docref(NULL, E_WARNING, "Cannot change session id when session is active");
+ RETURN_FALSE;
+ }
+
if (PS(id)) {
/* keep compatibility for "\0" characters ???
* see: ext/session/tests/session_id_error3.phpt */
@@ -2059,7 +2148,7 @@ static PHP_FUNCTION(session_id)
if (name) {
if (PS(id)) {
- zend_string_release(PS(id));
+ zend_string_release_ex(PS(id), 0);
}
PS(id) = zend_string_copy(name);
}
@@ -2100,7 +2189,7 @@ static PHP_FUNCTION(session_regenerate_id)
data = php_session_encode();
if (data) {
ret = PS(mod)->s_write(&PS(mod_data), PS(id), data, PS(gc_maxlifetime));
- zend_string_release(data);
+ zend_string_release_ex(data, 0);
} else {
ret = PS(mod)->s_write(&PS(mod_data), PS(id), ZSTR_EMPTY_ALLOC(), PS(gc_maxlifetime));
}
@@ -2115,10 +2204,10 @@ static PHP_FUNCTION(session_regenerate_id)
/* New session data */
if (PS(session_vars)) {
- zend_string_release(PS(session_vars));
+ zend_string_release_ex(PS(session_vars), 0);
PS(session_vars) = NULL;
}
- zend_string_release(PS(id));
+ zend_string_release_ex(PS(id), 0);
PS(id) = NULL;
if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name)) == FAILURE) {
@@ -2135,7 +2224,7 @@ static PHP_FUNCTION(session_regenerate_id)
}
if (PS(use_strict_mode) && PS(mod)->s_validate_sid &&
PS(mod)->s_validate_sid(&PS(mod_data), PS(id)) == FAILURE) {
- zend_string_release(PS(id));
+ zend_string_release_ex(PS(id), 0);
PS(id) = PS(mod)->s_create_sid(&PS(mod_data));
if (!PS(id)) {
PS(mod)->s_close(&PS(mod_data));
@@ -2152,7 +2241,7 @@ static PHP_FUNCTION(session_regenerate_id)
RETURN_FALSE;
}
if (data) {
- zend_string_release(data);
+ zend_string_release_ex(data, 0);
}
if (PS(use_cookies)) {
@@ -2197,7 +2286,7 @@ static PHP_FUNCTION(session_create_id)
} else {
/* Detect collision and retry */
if (PS(mod)->s_validate_sid(&PS(mod_data), new_id) == FAILURE) {
- zend_string_release(new_id);
+ zend_string_release_ex(new_id, 0);
continue;
}
break;
@@ -2209,7 +2298,7 @@ static PHP_FUNCTION(session_create_id)
if (new_id) {
smart_str_append(&id, new_id);
- zend_string_release(new_id);
+ zend_string_release_ex(new_id, 0);
} else {
smart_str_free(&id);
php_error_docref(NULL, E_WARNING, "Failed to create new ID");
@@ -2246,7 +2335,7 @@ static PHP_FUNCTION(session_cache_limiter)
if (limiter) {
ini_name = zend_string_init("session.cache_limiter", sizeof("session.cache_limiter") - 1, 0);
zend_alter_ini_entry(ini_name, limiter, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
- zend_string_release(ini_name);
+ zend_string_release_ex(ini_name, 0);
}
}
/* }}} */
@@ -2278,7 +2367,7 @@ static PHP_FUNCTION(session_cache_expire)
convert_to_string_ex(expires);
ini_name = zend_string_init("session.cache_expire", sizeof("session.cache_expire") - 1, 0);
zend_alter_ini_entry(ini_name, Z_STR_P(expires), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
- zend_string_release(ini_name);
+ zend_string_release_ex(ini_name, 0);
}
}
/* }}} */
@@ -2377,11 +2466,12 @@ static PHP_FUNCTION(session_start)
if (zend_string_equals_literal(str_idx, "read_and_close")) {
read_and_close = zval_get_long(value);
} else {
- zend_string *val = zval_get_string(value);
+ zend_string *tmp_val;
+ zend_string *val = zval_get_tmp_string(value, &tmp_val);
if (php_session_start_set_ini(str_idx, val) == FAILURE) {
php_error_docref(NULL, E_WARNING, "Setting option '%s' failed", ZSTR_VAL(str_idx));
}
- zend_string_release(val);
+ zend_tmp_string_release(tmp_val);
}
break;
default:
@@ -2620,7 +2710,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_session_cache_expire, 0, 0, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_session_set_cookie_params, 0, 0, 1)
- ZEND_ARG_INFO(0, lifetime)
+ ZEND_ARG_INFO(0, lifetime_or_options)
ZEND_ARG_INFO(0, path)
ZEND_ARG_INFO(0, domain)
ZEND_ARG_INFO(0, secure)
@@ -2842,7 +2932,7 @@ static PHP_MINIT_FUNCTION(session) /* {{{ */
{
zend_class_entry ce;
- zend_register_auto_global(zend_string_init("_SESSION", sizeof("_SESSION") - 1, 1), 0, NULL);
+ zend_register_auto_global(zend_string_init_interned("_SESSION", sizeof("_SESSION") - 1, 1), 0, NULL);
my_module_number = module_number;
PS(module_number) = module_number;
@@ -2906,7 +2996,7 @@ static PHP_MSHUTDOWN_FUNCTION(session) /* {{{ */
static PHP_MINFO_FUNCTION(session) /* {{{ */
{
- ps_module **mod;
+ const ps_module **mod;
ps_serializer *ser;
smart_str save_handlers = {0};
smart_str ser_handlers = {0};
@@ -2974,9 +3064,8 @@ static zend_bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_pr
if ((ppid = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[where]), PS(session_name), progress->sname_len))
&& Z_TYPE_P(ppid) == IS_STRING) {
- zval_dtor(dest);
- ZVAL_DEREF(ppid);
- ZVAL_COPY(dest, ppid);
+ zval_ptr_dtor(dest);
+ ZVAL_COPY_DEREF(dest, ppid);
return 1;
}
@@ -3104,7 +3193,7 @@ static int php_session_rfc1867_callback(unsigned int event, void *event_data, vo
size_t name_len = strlen(data->name);
if (name_len == progress->sname_len && memcmp(data->name, PS(session_name), name_len) == 0) {
- zval_dtor(&progress->sid);
+ zval_ptr_dtor(&progress->sid);
ZVAL_STRINGL(&progress->sid, (*data->value), value_len);
} else if (name_len == strlen(PS(rfc1867_name)) && memcmp(data->name, PS(rfc1867_name), name_len + 1) == 0) {
smart_str_free(&progress->key);
diff --git a/ext/session/tests/005.phpt b/ext/session/tests/005.phpt
index 3dbf859523..3a95c9f8f6 100644
--- a/ext/session/tests/005.phpt
+++ b/ext/session/tests/005.phpt
@@ -89,7 +89,7 @@ var_dump($_SESSION["c"]);
session_destroy();
?>
---EXPECTF--
+--EXPECT--
OPEN: PHPSESSID
READ: abtest
object(foo)#4 (2) {
diff --git a/ext/session/tests/006.phpt b/ext/session/tests/006.phpt
index 68cea7314a..c38987edff 100644
--- a/ext/session/tests/006.phpt
+++ b/ext/session/tests/006.phpt
@@ -26,7 +26,7 @@ class b {
$this->a = &$a;
}
}
-
+
$a = new a();
$b = new b($a);
diff --git a/ext/session/tests/025.phpt b/ext/session/tests/025.phpt
index 83ab6ca370..aa1f995c49 100644
--- a/ext/session/tests/025.phpt
+++ b/ext/session/tests/025.phpt
@@ -46,13 +46,6 @@ class handler {
}
function gc() { return true; }
-
- function __construct()
- {
- if (ini_get("unicode.semantics")) {
- $this->data = str_replace('s:', 'U:', $this->data);
- }
- }
}
$hnd = new handler;
diff --git a/ext/session/tests/026.phpt b/ext/session/tests/026.phpt
index b61039ee0c..cc9a8de22c 100644
--- a/ext/session/tests/026.phpt
+++ b/ext/session/tests/026.phpt
@@ -19,14 +19,14 @@ session_start();
class a {
public $test = "hallo";
}
-
+
class b {
public $a;
function __construct(&$a) {
$this->a = &$a;
}
}
-
+
$a = new a();
$b = new b($a);
diff --git a/ext/session/tests/028.phpt b/ext/session/tests/028.phpt
deleted file mode 100644
index 79638d283d..0000000000
--- a/ext/session/tests/028.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-$session_array = explode(";", session_encode()); should not segfault
---SKIPIF--
-<?php include('skipif.inc'); ?>
---INI--
-session.use_cookies=0
-session.cache_limiter=
---FILE--
-<?php
-error_reporting(E_ALL);
-
-$session_array = explode(";", @session_encode());
-print "I live\n";
-?>
---EXPECT--
-I live
diff --git a/ext/session/tests/030.phpt b/ext/session/tests/030.phpt
deleted file mode 100644
index 32909eb58c..0000000000
--- a/ext/session/tests/030.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-redefining SID should not cause warnings
---SKIPIF--
-<?php include('skipif.inc'); ?>
---INI--
-session.use_cookies=0
-session.use_strict_mode=0
-session.cache_limiter=
-session.serialize_handler=php
-session.save_handler=files
---FILE--
-<?php
-error_reporting(E_ALL);
-
-session_id("abtest");
-session_start();
-session_destroy();
-session_id("abtest2");
-session_start();
-session_destroy();
-
-print "I live\n";
-?>
---EXPECT--
-I live
diff --git a/ext/session/tests/bug24592.phpt b/ext/session/tests/bug24592.phpt
index 3e651cdeec..9f6c395317 100644
--- a/ext/session/tests/bug24592.phpt
+++ b/ext/session/tests/bug24592.phpt
@@ -8,15 +8,15 @@ session.save_handler=files
--FILE--
<?php
@session_start();
-
+
$foo = $_SESSION['foo'];
$bar = $_SESSION['bar'];
-
+
var_dump($foo, $bar, $_SESSION);
$_SESSION['foo'] = $foo;
$_SESSION['bar'] = $bar;
-
+
var_dump($_SESSION);
?>
--EXPECTF--
diff --git a/ext/session/tests/bug31454.phpt b/ext/session/tests/bug31454.phpt
index 89b7048477..dd60996214 100644
--- a/ext/session/tests/bug31454.phpt
+++ b/ext/session/tests/bug31454.phpt
@@ -12,7 +12,7 @@ session_set_save_handler(
array(&$arf, 'write'),
array(&$arf, 'destroy'),
array(&$arf, 'gc'));
-
+
echo "Done\n";
?>
--EXPECTF--
diff --git a/ext/session/tests/bug60634.phpt b/ext/session/tests/bug60634.phpt
index 56b235af55..064f29a0d2 100644
--- a/ext/session/tests/bug60634.phpt
+++ b/ext/session/tests/bug60634.phpt
@@ -50,7 +50,7 @@ echo "um, hi\n";
*/
?>
---EXPECTF--
+--EXPECT--
write: goodbye cruel world
Warning: Unknown: Cannot call session save handler in a recursive manner in Unknown on line 0
diff --git a/ext/session/tests/bug60860.phpt b/ext/session/tests/bug60860.phpt
index 38a3796b68..f6f641d94e 100644
--- a/ext/session/tests/bug60860.phpt
+++ b/ext/session/tests/bug60860.phpt
@@ -14,7 +14,7 @@ session_start();
echo "ok\n";
?>
---EXPECTF--
+--EXPECT--
PHP Recoverable fatal error: PHP Startup: Cannot set 'user' save handler by ini_set() or session_module_name() in Unknown on line 0
ok
diff --git a/ext/session/tests/bug61470.phpt b/ext/session/tests/bug61470.phpt
index 93d79fb75c..7f07929f2e 100644
--- a/ext/session/tests/bug61470.phpt
+++ b/ext/session/tests/bug61470.phpt
@@ -2,7 +2,6 @@
Bug #61470 (session_regenerate_id() does not create session file)
--SKIPIF--
<?php include('skipif.inc'); ?>
---INI--
--FILE--
<?php
ob_start();
@@ -21,7 +20,7 @@ var_dump(is_file($file2));
// cleanup
@unlink($file1);
@unlink($file2);
+?>
--EXPECT--
bool(true)
bool(true)
-
diff --git a/ext/session/tests/bug61728.phpt b/ext/session/tests/bug61728.phpt
index 2e90829d55..b0ed3a1a17 100644
--- a/ext/session/tests/bug61728.phpt
+++ b/ext/session/tests/bug61728.phpt
@@ -3,7 +3,7 @@ Bug #61728 (PHP crash when calling ob_start in request_shutdown phase)
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
-<?php
+<?php
function output_html($ext) {
return strlen($ext);
}
@@ -37,5 +37,5 @@ function gc ($maxlifetime) {
session_set_save_handler ("open", "close", "read", "write", "destroy", "gc");
session_start();
---EXPECTF--
+--EXPECT--
8
diff --git a/ext/session/tests/bug63379.phpt b/ext/session/tests/bug63379.phpt
index 80941828c8..06711727cf 100644
--- a/ext/session/tests/bug63379.phpt
+++ b/ext/session/tests/bug63379.phpt
@@ -33,7 +33,7 @@ session_unset();
session_start();
var_dump($_SESSION);
---EXPECTF--
+--EXPECT--
array(1) {
["foo"]=>
string(5) "hello"
diff --git a/ext/session/tests/bug63379_nodestroy.phpt b/ext/session/tests/bug63379_nodestroy.phpt
index 03a9ae74d9..3e377f35b5 100644
--- a/ext/session/tests/bug63379_nodestroy.phpt
+++ b/ext/session/tests/bug63379_nodestroy.phpt
@@ -33,7 +33,7 @@ session_unset();
session_start();
var_dump($_SESSION);
---EXPECTF--
+--EXPECT--
array(1) {
["foo"]=>
string(5) "hello"
diff --git a/ext/session/tests/bug65475.phpt b/ext/session/tests/bug65475.phpt
index 7dc5463879..fcf5e59b60 100644
--- a/ext/session/tests/bug65475.phpt
+++ b/ext/session/tests/bug65475.phpt
@@ -26,7 +26,7 @@ var_dump($session_id === session_id());
var_dump($_SESSION['cnt']); // Should be int(2)
session_write_close();
---EXPECTF--
+--EXPECT--
Testing file module
bool(true)
bool(true)
diff --git a/ext/session/tests/bug66481.phpt b/ext/session/tests/bug66481.phpt
index c75cb88d1c..3ceb3e299e 100644
--- a/ext/session/tests/bug66481.phpt
+++ b/ext/session/tests/bug66481.phpt
@@ -10,7 +10,7 @@ ob_start();
var_dump(session_name("foo"));
var_dump(session_name("bar"));
---EXPECTF--
+--EXPECT--
PHP Warning: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0
Warning: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0
diff --git a/ext/session/tests/bug66827.phpt b/ext/session/tests/bug66827.phpt
index 4e1a4f7aea..6329d29226 100644
--- a/ext/session/tests/bug66827.phpt
+++ b/ext/session/tests/bug66827.phpt
@@ -1,6 +1,5 @@
--TEST--
Bug #66827: Session raises E_NOTICE when session name variable is array.
---INI--
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
@@ -8,5 +7,6 @@ Bug #66827: Session raises E_NOTICE when session name variable is array.
$_COOKIE[session_name()] = array();
session_start();
echo 'OK';
---EXPECTF--
+?>
+--EXPECT--
OK
diff --git a/ext/session/tests/bug69111.phpt b/ext/session/tests/bug69111.phpt
index c7a6cada65..ce14dc750c 100644
--- a/ext/session/tests/bug69111.phpt
+++ b/ext/session/tests/bug69111.phpt
@@ -10,7 +10,7 @@ session_set_save_handler($sh);
$savePath = ini_get('session.save_path');
$sessionName = ini_get('session.name');
-// session_start(); // Uncommenting this makes it not crash when reading the session (see below), but it will not return any data.
+// session_start(); // Uncommenting this makes it not crash when reading the session (see below), but it will not return any data.
$sh->open($savePath, $sessionName);
$sh->write("foo", "bar");
diff --git a/ext/session/tests/bug71603.phpt b/ext/session/tests/bug71603.phpt
index 588b1fecfb..40032088fe 100644
--- a/ext/session/tests/bug71603.phpt
+++ b/ext/session/tests/bug71603.phpt
@@ -11,6 +11,6 @@ session.use_only_cookies=0
ob_start();
echo "ok\n";
?>
---EXPECTF--
+--EXPECT--
ok
diff --git a/ext/session/tests/bug71974.phpt b/ext/session/tests/bug71974.phpt
index b692bce2c5..388befdaf3 100644
--- a/ext/session/tests/bug71974.phpt
+++ b/ext/session/tests/bug71974.phpt
@@ -17,7 +17,7 @@ ob_start();
session_start()
?>
<a href="some.php">abc</a>
---EXPECTF--
+--EXPECT--
<a href="some.php">abc</a>
diff --git a/ext/session/tests/bug72940.phpt b/ext/session/tests/bug72940.phpt
index 4d53bc098e..d8f8c35bf4 100644
--- a/ext/session/tests/bug72940.phpt
+++ b/ext/session/tests/bug72940.phpt
@@ -29,7 +29,7 @@ session_start();
var_dump(session_id(), SID);
session_destroy();
?>
---EXPECTF--
+--EXPECT--
string(12) "bug72940test"
string(0) ""
string(11) "bug72940get"
diff --git a/ext/session/tests/bug74541.phpt b/ext/session/tests/bug74541.phpt
index 8c70ebe126..dec2f25b5d 100644
--- a/ext/session/tests/bug74541.phpt
+++ b/ext/session/tests/bug74541.phpt
@@ -3,7 +3,6 @@ Bug #74541 Wrong reflection on session_start()
--SKIPIF--
<?php
include('skipif.inc');
-if (!extension_loaded('reflection')) die("skip");
?>
--FILE--
<?php
diff --git a/ext/session/tests/bug74833.phpt b/ext/session/tests/bug74833.phpt
index 5a0eda71f7..fdd6054f8a 100644
--- a/ext/session/tests/bug74833.phpt
+++ b/ext/session/tests/bug74833.phpt
@@ -16,7 +16,7 @@ var_dump(isset($c['session']['SID']));
ob_end_flush();
?>
==DONE==
---EXPECTF--
+--EXPECT--
bool(true)
==DONE==
diff --git a/ext/session/tests/rfc1867.phpt b/ext/session/tests/rfc1867.phpt
index be021007d3..21a70c8a28 100644
--- a/ext/session/tests/rfc1867.phpt
+++ b/ext/session/tests/rfc1867.phpt
@@ -58,11 +58,11 @@ array(2) {
["file1"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file1.txt"
+ string(9) "file1.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
@@ -71,11 +71,11 @@ array(2) {
["file2"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file2.txt"
+ string(9) "file2.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
diff --git a/ext/session/tests/rfc1867_cleanup.phpt b/ext/session/tests/rfc1867_cleanup.phpt
index d18a2d267d..63b4e4bc0d 100644
--- a/ext/session/tests/rfc1867_cleanup.phpt
+++ b/ext/session/tests/rfc1867_cleanup.phpt
@@ -58,11 +58,11 @@ array(2) {
["file1"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file1.txt"
+ string(9) "file1.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
@@ -71,11 +71,11 @@ array(2) {
["file2"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file2.txt"
+ string(9) "file2.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
diff --git a/ext/session/tests/rfc1867_disabled.phpt b/ext/session/tests/rfc1867_disabled.phpt
index 973cd5bd5f..55707f6907 100644
--- a/ext/session/tests/rfc1867_disabled.phpt
+++ b/ext/session/tests/rfc1867_disabled.phpt
@@ -51,11 +51,11 @@ array(2) {
["file1"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file1.txt"
+ string(9) "file1.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
@@ -64,11 +64,11 @@ array(2) {
["file2"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file2.txt"
+ string(9) "file2.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
diff --git a/ext/session/tests/rfc1867_disabled_2.phpt b/ext/session/tests/rfc1867_disabled_2.phpt
index bc4b0e6c40..10afe8f19d 100644
--- a/ext/session/tests/rfc1867_disabled_2.phpt
+++ b/ext/session/tests/rfc1867_disabled_2.phpt
@@ -51,11 +51,11 @@ array(2) {
["file1"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file1.txt"
+ string(9) "file1.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
@@ -64,11 +64,11 @@ array(2) {
["file2"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file2.txt"
+ string(9) "file2.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
diff --git a/ext/session/tests/rfc1867_inter.phpt b/ext/session/tests/rfc1867_inter.phpt
index 431300b6bb..577591feda 100644
--- a/ext/session/tests/rfc1867_inter.phpt
+++ b/ext/session/tests/rfc1867_inter.phpt
@@ -61,11 +61,11 @@ array(2) {
["file1"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file1.txt"
+ string(9) "file1.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
@@ -74,11 +74,11 @@ array(2) {
["file2"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file2.txt"
+ string(9) "file2.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
diff --git a/ext/session/tests/rfc1867_invalid_settings.phpt b/ext/session/tests/rfc1867_invalid_settings.phpt
index 526e0cbdd8..1a989e979b 100644
--- a/ext/session/tests/rfc1867_invalid_settings.phpt
+++ b/ext/session/tests/rfc1867_invalid_settings.phpt
@@ -4,7 +4,7 @@ session rfc1867 invalid settings
session.upload_progress.freq=-1
error_log=
--SKIPIF--
-<?php
+<?php
include('skipif.inc');
?>
--FILE--
diff --git a/ext/session/tests/rfc1867_invalid_settings_2.phpt b/ext/session/tests/rfc1867_invalid_settings_2.phpt
index 15281942a0..9246e1dbbc 100644
--- a/ext/session/tests/rfc1867_invalid_settings_2.phpt
+++ b/ext/session/tests/rfc1867_invalid_settings_2.phpt
@@ -4,7 +4,7 @@ session rfc1867 invalid settings 2
session.upload_progress.freq=200%
error_log=
--SKIPIF--
-<?php
+<?php
include('skipif.inc');
?>
--FILE--
diff --git a/ext/session/tests/rfc1867_no_name.phpt b/ext/session/tests/rfc1867_no_name.phpt
index 949e7aaf4b..e34f776f12 100644
--- a/ext/session/tests/rfc1867_no_name.phpt
+++ b/ext/session/tests/rfc1867_no_name.phpt
@@ -51,11 +51,11 @@ array(2) {
["file1"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file1.txt"
+ string(9) "file1.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
@@ -64,11 +64,11 @@ array(2) {
["file2"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file2.txt"
+ string(9) "file2.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
diff --git a/ext/session/tests/rfc1867_sid_cookie.phpt b/ext/session/tests/rfc1867_sid_cookie.phpt
index 28ac2605a6..6a58172f90 100644
--- a/ext/session/tests/rfc1867_sid_cookie.phpt
+++ b/ext/session/tests/rfc1867_sid_cookie.phpt
@@ -57,11 +57,11 @@ array(2) {
["file1"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file1.txt"
+ string(9) "file1.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
@@ -70,11 +70,11 @@ array(2) {
["file2"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file2.txt"
+ string(9) "file2.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
diff --git a/ext/session/tests/rfc1867_sid_get.phpt b/ext/session/tests/rfc1867_sid_get.phpt
index 93600b4834..089eefe967 100644
--- a/ext/session/tests/rfc1867_sid_get.phpt
+++ b/ext/session/tests/rfc1867_sid_get.phpt
@@ -55,11 +55,11 @@ array(2) {
["file1"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file1.txt"
+ string(9) "file1.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
@@ -68,11 +68,11 @@ array(2) {
["file2"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file2.txt"
+ string(9) "file2.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
diff --git a/ext/session/tests/rfc1867_sid_get_2.phpt b/ext/session/tests/rfc1867_sid_get_2.phpt
index bb418c7bbf..7cb2ffb17a 100644
--- a/ext/session/tests/rfc1867_sid_get_2.phpt
+++ b/ext/session/tests/rfc1867_sid_get_2.phpt
@@ -57,11 +57,11 @@ array(2) {
["file1"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file1.txt"
+ string(9) "file1.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
@@ -70,11 +70,11 @@ array(2) {
["file2"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file2.txt"
+ string(9) "file2.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
diff --git a/ext/session/tests/rfc1867_sid_invalid.phpt b/ext/session/tests/rfc1867_sid_invalid.phpt
index 86cff6c089..881b1d5bb4 100644
--- a/ext/session/tests/rfc1867_sid_invalid.phpt
+++ b/ext/session/tests/rfc1867_sid_invalid.phpt
@@ -65,11 +65,11 @@ array(2) {
["file1"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file1.txt"
+ string(9) "file1.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
@@ -78,11 +78,11 @@ array(2) {
["file2"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file2.txt"
+ string(9) "file2.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
diff --git a/ext/session/tests/rfc1867_sid_only_cookie.phpt b/ext/session/tests/rfc1867_sid_only_cookie.phpt
index 167432a60d..f8f20fc3d8 100644
--- a/ext/session/tests/rfc1867_sid_only_cookie.phpt
+++ b/ext/session/tests/rfc1867_sid_only_cookie.phpt
@@ -57,11 +57,11 @@ array(2) {
["file1"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file1.txt"
+ string(9) "file1.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
@@ -70,11 +70,11 @@ array(2) {
["file2"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file2.txt"
+ string(9) "file2.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
diff --git a/ext/session/tests/rfc1867_sid_only_cookie_2.phpt b/ext/session/tests/rfc1867_sid_only_cookie_2.phpt
index e56c31e682..e98f4c4e3f 100644
--- a/ext/session/tests/rfc1867_sid_only_cookie_2.phpt
+++ b/ext/session/tests/rfc1867_sid_only_cookie_2.phpt
@@ -54,11 +54,11 @@ array(2) {
["file1"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file1.txt"
+ string(9) "file1.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
@@ -67,11 +67,11 @@ array(2) {
["file2"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file2.txt"
+ string(9) "file2.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
diff --git a/ext/session/tests/rfc1867_sid_post.phpt b/ext/session/tests/rfc1867_sid_post.phpt
index 858101c3b7..51a97b900e 100644
--- a/ext/session/tests/rfc1867_sid_post.phpt
+++ b/ext/session/tests/rfc1867_sid_post.phpt
@@ -53,11 +53,11 @@ array(2) {
["file1"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file1.txt"
+ string(9) "file1.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
@@ -66,11 +66,11 @@ array(2) {
["file2"]=>
array(5) {
["name"]=>
- %string|unicode%(9) "file2.txt"
+ string(9) "file2.txt"
["type"]=>
- %string|unicode%(0) ""
+ string(0) ""
["tmp_name"]=>
- %string|unicode%(%d) "%s"
+ string(%d) "%s"
["error"]=>
int(0)
["size"]=>
diff --git a/ext/session/tests/session_abort_basic.phpt b/ext/session/tests/session_abort_basic.phpt
index b9736a912b..b5a12ae4c1 100644
--- a/ext/session/tests/session_abort_basic.phpt
+++ b/ext/session/tests/session_abort_basic.phpt
@@ -37,7 +37,7 @@ var_dump($_SESSION); // Should only have 'foo'
echo "Done".PHP_EOL;
?>
---EXPECTF--
+--EXPECT--
*** Testing session_abort() : basic functionality ***
array(2) {
["foo"]=>
diff --git a/ext/session/tests/session_cache_expire_basic.phpt b/ext/session/tests/session_cache_expire_basic.phpt
index bb5784c675..6da766cd86 100644
--- a/ext/session/tests/session_cache_expire_basic.phpt
+++ b/ext/session/tests/session_cache_expire_basic.phpt
@@ -7,10 +7,10 @@ Test session_cache_expire() function : basic functionality
ob_start();
-/*
+/*
* Prototype : int session_cache_expire([int $new_cache_expire])
* Description : Return current cache expire
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_cache_expire() : basic functionality ***\n";
@@ -26,7 +26,7 @@ var_dump(session_cache_expire());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_cache_expire() : basic functionality ***
int(180)
int(180)
diff --git a/ext/session/tests/session_cache_expire_error.phpt b/ext/session/tests/session_cache_expire_error.phpt
index 4a335e7f67..486ba787e5 100644
--- a/ext/session/tests/session_cache_expire_error.phpt
+++ b/ext/session/tests/session_cache_expire_error.phpt
@@ -7,10 +7,10 @@ Test session_cache_expire() function : error functionality
ob_start();
-/*
+/*
* Prototype : int session_cache_expire([int $new_cache_expire])
* Description : Return current cache expire
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_cache_expire() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_cache_expire_variation1.phpt b/ext/session/tests/session_cache_expire_variation1.phpt
index 5389e88e17..8c5f2692ee 100644
--- a/ext/session/tests/session_cache_expire_variation1.phpt
+++ b/ext/session/tests/session_cache_expire_variation1.phpt
@@ -9,10 +9,10 @@ session.cache_expire=360
ob_start();
-/*
+/*
* Prototype : int session_cache_expire([int $new_cache_expire])
* Description : Return current cache expire
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_cache_expire() : variation ***\n";
@@ -28,7 +28,7 @@ var_dump(session_cache_expire());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_cache_expire() : variation ***
int(360)
int(360)
diff --git a/ext/session/tests/session_cache_expire_variation2.phpt b/ext/session/tests/session_cache_expire_variation2.phpt
index f3a9ab3e1b..20835e6365 100644
--- a/ext/session/tests/session_cache_expire_variation2.phpt
+++ b/ext/session/tests/session_cache_expire_variation2.phpt
@@ -7,10 +7,10 @@ Test session_cache_expire() function : variation
ob_start();
-/*
+/*
* Prototype : int session_cache_expire([int $new_cache_expire])
* Description : Return current cache expire
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_cache_expire() : variation ***\n";
@@ -27,7 +27,7 @@ var_dump(session_cache_expire());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_cache_expire() : variation ***
int(360)
int(360)
diff --git a/ext/session/tests/session_cache_expire_variation3.phpt b/ext/session/tests/session_cache_expire_variation3.phpt
index 2e36aafe6d..8e107956d4 100644
--- a/ext/session/tests/session_cache_expire_variation3.phpt
+++ b/ext/session/tests/session_cache_expire_variation3.phpt
@@ -7,10 +7,10 @@ Test session_cache_expire() function : variation
ob_start();
-/*
+/*
* Prototype : int session_cache_expire([int $new_cache_expire])
* Description : Return current cache expire
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_cache_expire() : variation ***\n";
@@ -30,7 +30,7 @@ var_dump(ini_get("session.cache_expire"));
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_cache_expire() : variation ***
string(3) "180"
int(180)
diff --git a/ext/session/tests/session_cache_limiter_basic.phpt b/ext/session/tests/session_cache_limiter_basic.phpt
index 96bc5eb1b7..bfc2f68427 100644
--- a/ext/session/tests/session_cache_limiter_basic.phpt
+++ b/ext/session/tests/session_cache_limiter_basic.phpt
@@ -7,10 +7,10 @@ Test session_cache_limiter() function : basic functionality
ob_start();
-/*
+/*
* Prototype : string session_cache_limiter([string $cache_limiter])
* Description : Get and/or set the current cache limiter
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_cache_limiter() : basic functionality ***\n";
@@ -42,7 +42,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_cache_limiter() : basic functionality ***
string(7) "nocache"
string(7) "nocache"
diff --git a/ext/session/tests/session_cache_limiter_error.phpt b/ext/session/tests/session_cache_limiter_error.phpt
index b5bd42fdad..df689d65fb 100644
--- a/ext/session/tests/session_cache_limiter_error.phpt
+++ b/ext/session/tests/session_cache_limiter_error.phpt
@@ -7,10 +7,10 @@ Test session_cache_limiter() function : error functionality
ob_start();
-/*
+/*
* Prototype : string session_cache_limiter([string $cache_limiter])
* Description : Get and/or set the current cache limiter
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_cache_limiter() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_cache_limiter_variation1.phpt b/ext/session/tests/session_cache_limiter_variation1.phpt
index ce9b011d26..5af208a909 100644
--- a/ext/session/tests/session_cache_limiter_variation1.phpt
+++ b/ext/session/tests/session_cache_limiter_variation1.phpt
@@ -9,10 +9,10 @@ session.cache_limiter=nocache
ob_start();
-/*
+/*
* Prototype : string session_cache_limiter([string $cache_limiter])
* Description : Get and/or set the current cache limiter
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_cache_limiter() : variation ***\n";
diff --git a/ext/session/tests/session_cache_limiter_variation2.phpt b/ext/session/tests/session_cache_limiter_variation2.phpt
index 58dc5da6c4..eb63d99dac 100644
--- a/ext/session/tests/session_cache_limiter_variation2.phpt
+++ b/ext/session/tests/session_cache_limiter_variation2.phpt
@@ -7,10 +7,10 @@ Test session_cache_limiter() function : variation
ob_start();
-/*
+/*
* Prototype : string session_cache_limiter([string $cache_limiter])
* Description : Get and/or set the current cache limiter
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_cache_limiter() : variation ***\n";
diff --git a/ext/session/tests/session_cache_limiter_variation3.phpt b/ext/session/tests/session_cache_limiter_variation3.phpt
index a55648a851..11d452d46a 100644
--- a/ext/session/tests/session_cache_limiter_variation3.phpt
+++ b/ext/session/tests/session_cache_limiter_variation3.phpt
@@ -7,10 +7,10 @@ Test session_cache_limiter() function : variation
ob_start();
-/*
+/*
* Prototype : string session_cache_limiter([string $cache_limiter])
* Description : Get and/or set the current cache limiter
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_cache_limiter() : variation ***\n";
diff --git a/ext/session/tests/session_commit_basic.phpt b/ext/session/tests/session_commit_basic.phpt
index 3419a229a7..f032ad469e 100644
--- a/ext/session/tests/session_commit_basic.phpt
+++ b/ext/session/tests/session_commit_basic.phpt
@@ -7,10 +7,10 @@ Test session_commit() function : basic functionality
ob_start();
-/*
+/*
* Prototype : bool session_commit(void)
* Description : Write session data and end session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_commit() : basic functionality ***\n";
@@ -27,7 +27,7 @@ var_dump($_SESSION);
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_commit() : basic functionality ***
bool(true)
array(0) {
diff --git a/ext/session/tests/session_commit_error.phpt b/ext/session/tests/session_commit_error.phpt
index c71cee34eb..79fa72e67b 100644
--- a/ext/session/tests/session_commit_error.phpt
+++ b/ext/session/tests/session_commit_error.phpt
@@ -7,10 +7,10 @@ Test session_commit() function : error functionality
ob_start();
-/*
+/*
* Prototype : bool session_commit(void)
* Description : Write session data and end session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_commit() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_commit_variation1.phpt b/ext/session/tests/session_commit_variation1.phpt
index f631111158..ab045e00fa 100644
--- a/ext/session/tests/session_commit_variation1.phpt
+++ b/ext/session/tests/session_commit_variation1.phpt
@@ -7,10 +7,10 @@ Test session_commit() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_commit(void)
* Description : Write session data and end session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_commit() : variation ***\n";
@@ -27,7 +27,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_commit() : variation ***
bool(true)
bool(true)
diff --git a/ext/session/tests/session_commit_variation2.phpt b/ext/session/tests/session_commit_variation2.phpt
index 91e0968641..4d1107281e 100644
--- a/ext/session/tests/session_commit_variation2.phpt
+++ b/ext/session/tests/session_commit_variation2.phpt
@@ -7,10 +7,10 @@ Test session_commit() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_commit(void)
* Description : Write session data and end session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_commit() : variation ***\n";
@@ -33,7 +33,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_commit() : variation ***
bool(true)
array(0) {
diff --git a/ext/session/tests/session_commit_variation3.phpt b/ext/session/tests/session_commit_variation3.phpt
index e2d2c2409e..9442faf238 100644
--- a/ext/session/tests/session_commit_variation3.phpt
+++ b/ext/session/tests/session_commit_variation3.phpt
@@ -9,10 +9,10 @@ session.auto_start=1
ob_start();
-/*
+/*
* Prototype : bool session_commit(void)
* Description : Write session data and end session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_commit() : variation ***\n";
@@ -26,7 +26,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_commit() : variation ***
array(0) {
}
diff --git a/ext/session/tests/session_commit_variation4.phpt b/ext/session/tests/session_commit_variation4.phpt
index fb3ea73058..9a6b929ca2 100644
--- a/ext/session/tests/session_commit_variation4.phpt
+++ b/ext/session/tests/session_commit_variation4.phpt
@@ -39,7 +39,7 @@ var_dump(ini_get('session.use_strict_mode'));
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_commit() : variation ***
string(1) "0"
string(0) ""
diff --git a/ext/session/tests/session_decode_basic.phpt b/ext/session/tests/session_decode_basic.phpt
index 1b7b6e0805..07144aa4f5 100644
--- a/ext/session/tests/session_decode_basic.phpt
+++ b/ext/session/tests/session_decode_basic.phpt
@@ -7,10 +7,10 @@ Test session_decode() function : basic functionality
ob_start();
-/*
+/*
* Prototype : string session_decode(void)
* Description : Decodes session data from a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_decode() : basic functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
@@ -96,7 +96,7 @@ fclose($fp);
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_decode() : basic functionality ***
bool(true)
diff --git a/ext/session/tests/session_decode_basic_serialize.phpt b/ext/session/tests/session_decode_basic_serialize.phpt
index 48893691aa..9afb0a38e0 100644
--- a/ext/session/tests/session_decode_basic_serialize.phpt
+++ b/ext/session/tests/session_decode_basic_serialize.phpt
@@ -7,10 +7,10 @@ Test session_decode() function : basic functionality
ob_start();
-/*
+/*
* Prototype : string session_decode(void)
* Description : Decodes session data from a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_decode() : basic functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
@@ -97,7 +97,7 @@ fclose($fp);
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_decode() : basic functionality ***
bool(true)
diff --git a/ext/session/tests/session_decode_error.phpt b/ext/session/tests/session_decode_error.phpt
index 72bc25976b..098ecce079 100644
--- a/ext/session/tests/session_decode_error.phpt
+++ b/ext/session/tests/session_decode_error.phpt
@@ -7,10 +7,10 @@ Test session_decode() function : error functionality
ob_start();
-/*
+/*
* Prototype : string session_decode(void)
* Description : Decodes session data from a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_decode() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_decode_error2.phpt b/ext/session/tests/session_decode_error2.phpt
index ff4e618a5e..37841deed8 100644
--- a/ext/session/tests/session_decode_error2.phpt
+++ b/ext/session/tests/session_decode_error2.phpt
@@ -7,10 +7,10 @@ Test session_decode() function : error functionality
ob_start();
-/*
+/*
* Prototype : string session_decode(void)
* Description : Decodes session data from a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_decode() : error functionality ***\n";
diff --git a/ext/session/tests/session_decode_variation1.phpt b/ext/session/tests/session_decode_variation1.phpt
index 011bdee5b9..dc37e089dc 100644
--- a/ext/session/tests/session_decode_variation1.phpt
+++ b/ext/session/tests/session_decode_variation1.phpt
@@ -7,10 +7,10 @@ Test session_decode() function : variation
ob_start();
-/*
+/*
* Prototype : string session_decode(void)
* Description : Decodes session data from a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_decode() : variation ***\n";
@@ -31,7 +31,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_decode() : variation ***
bool(true)
bool(true)
diff --git a/ext/session/tests/session_decode_variation2.phpt b/ext/session/tests/session_decode_variation2.phpt
index 0f88a28bd7..8343ab9c94 100644
--- a/ext/session/tests/session_decode_variation2.phpt
+++ b/ext/session/tests/session_decode_variation2.phpt
@@ -7,10 +7,10 @@ Test session_decode() function : basic functionality
ob_start();
-/*
+/*
* Prototype : string session_decode(void)
* Description : Decodes session data from a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_decode() : variation ***\n";
@@ -28,7 +28,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_decode() : variation ***
bool(true)
array(0) {
diff --git a/ext/session/tests/session_decode_variation3.phpt b/ext/session/tests/session_decode_variation3.phpt
index a50feb0cf0..3557efa46d 100644
--- a/ext/session/tests/session_decode_variation3.phpt
+++ b/ext/session/tests/session_decode_variation3.phpt
@@ -9,10 +9,10 @@ session.serialize_handler=blah
ob_start();
-/*
+/*
* Prototype : string session_decode(void)
* Description : Decodes session data from a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_decode() : variation ***\n";
diff --git a/ext/session/tests/session_decode_variation4.phpt b/ext/session/tests/session_decode_variation4.phpt
index 68c09370e4..ee9f892bf0 100644
--- a/ext/session/tests/session_decode_variation4.phpt
+++ b/ext/session/tests/session_decode_variation4.phpt
@@ -7,10 +7,10 @@ Test session_decode() function : variation
ob_start();
-/*
+/*
* Prototype : string session_decode(void)
* Description : Decodes session data from a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_decode() : variation ***\n";
@@ -29,7 +29,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_decode() : variation ***
bool(true)
array(0) {
diff --git a/ext/session/tests/session_destroy_error.phpt b/ext/session/tests/session_destroy_error.phpt
index a03face43d..a3e443e9d8 100644
--- a/ext/session/tests/session_destroy_error.phpt
+++ b/ext/session/tests/session_destroy_error.phpt
@@ -7,10 +7,10 @@ Test session_destroy() function : error functionality
ob_start();
-/*
+/*
* Prototype : bool session_destroy(void)
* Description : Destroys all data registered to a session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_destroy() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_destroy_variation1.phpt b/ext/session/tests/session_destroy_variation1.phpt
index bb3de056c0..fdbdf08c57 100644
--- a/ext/session/tests/session_destroy_variation1.phpt
+++ b/ext/session/tests/session_destroy_variation1.phpt
@@ -7,10 +7,10 @@ Test session_destroy() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_destroy(void)
* Description : Destroys all data registered to a session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_destroy() : variation ***\n";
diff --git a/ext/session/tests/session_destroy_variation2.phpt b/ext/session/tests/session_destroy_variation2.phpt
index 373647bffa..40f49a46a4 100644
--- a/ext/session/tests/session_destroy_variation2.phpt
+++ b/ext/session/tests/session_destroy_variation2.phpt
@@ -7,10 +7,10 @@ Test session_destroy() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_destroy(void)
* Description : Destroys all data registered to a session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_destroy() : variation ***\n";
@@ -29,7 +29,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_destroy() : variation ***
bool(true)
bool(true)
diff --git a/ext/session/tests/session_destroy_variation3.phpt b/ext/session/tests/session_destroy_variation3.phpt
index f53d0420bd..b63c17e392 100644
--- a/ext/session/tests/session_destroy_variation3.phpt
+++ b/ext/session/tests/session_destroy_variation3.phpt
@@ -7,10 +7,10 @@ Test session_destroy() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_destroy(void)
* Description : Destroys all data registered to a session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_destroy() : variation ***\n";
diff --git a/ext/session/tests/session_encode_basic.phpt b/ext/session/tests/session_encode_basic.phpt
index de2a9c97ee..dfe40d204d 100644
--- a/ext/session/tests/session_encode_basic.phpt
+++ b/ext/session/tests/session_encode_basic.phpt
@@ -9,10 +9,10 @@ serialize_precision=100
ob_start();
-/*
+/*
* Prototype : string session_encode(void)
* Description : Encodes the current session data as a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_encode() : basic functionality ***\n";
@@ -59,7 +59,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -68,7 +68,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_encode_error.phpt b/ext/session/tests/session_encode_error.phpt
index 54693963f1..955aff4d53 100644
--- a/ext/session/tests/session_encode_error.phpt
+++ b/ext/session/tests/session_encode_error.phpt
@@ -7,10 +7,10 @@ Test session_encode() function : basic functionality
ob_start();
-/*
+/*
* Prototype : string session_encode(void)
* Description : Encodes the current session data as a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_encode() : basic functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_encode_error2.phpt b/ext/session/tests/session_encode_error2.phpt
index 1a87eb14a3..056323ab76 100644
--- a/ext/session/tests/session_encode_error2.phpt
+++ b/ext/session/tests/session_encode_error2.phpt
@@ -7,10 +7,10 @@ Test session_encode() function : error functionality
ob_start();
-/*
+/*
* Prototype : string session_encode(void)
* Description : Encodes the current session data as a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_encode() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_encode_serialize.phpt b/ext/session/tests/session_encode_serialize.phpt
index 41c79c3e51..a5b147e504 100644
--- a/ext/session/tests/session_encode_serialize.phpt
+++ b/ext/session/tests/session_encode_serialize.phpt
@@ -17,7 +17,7 @@ session_write_close();
// Should finish without errors
echo 'Done'.PHP_EOL;
?>
---EXPECTF--
+--EXPECT--
bool(true)
string(51) "a:3:{i:-3;s:3:"foo";i:3;s:3:"bar";s:3:"var";i:123;}"
Done
diff --git a/ext/session/tests/session_encode_variation1.phpt b/ext/session/tests/session_encode_variation1.phpt
index cff175c1d1..26722783db 100644
--- a/ext/session/tests/session_encode_variation1.phpt
+++ b/ext/session/tests/session_encode_variation1.phpt
@@ -7,10 +7,10 @@ Test session_encode() function : variation
ob_start();
-/*
+/*
* Prototype : string session_encode(void)
* Description : Encodes the current session data as a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_encode() : variation ***\n";
diff --git a/ext/session/tests/session_encode_variation2.phpt b/ext/session/tests/session_encode_variation2.phpt
index a6d7331784..93fab30d67 100644
--- a/ext/session/tests/session_encode_variation2.phpt
+++ b/ext/session/tests/session_encode_variation2.phpt
@@ -9,10 +9,10 @@ session.auto_start=1
ob_start();
-/*
+/*
* Prototype : string session_encode(void)
* Description : Encodes the current session data as a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_encode() : variation ***\n";
diff --git a/ext/session/tests/session_encode_variation3.phpt b/ext/session/tests/session_encode_variation3.phpt
index 5fcac54228..3cdbbfe707 100644
--- a/ext/session/tests/session_encode_variation3.phpt
+++ b/ext/session/tests/session_encode_variation3.phpt
@@ -7,10 +7,10 @@ Test session_encode() function : variation
ob_start();
-/*
+/*
* Prototype : string session_encode(void)
* Description : Encodes the current session data as a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_encode() : variation ***\n";
@@ -25,7 +25,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_encode() : variation ***
bool(true)
string(34) "foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}"
diff --git a/ext/session/tests/session_encode_variation4.phpt b/ext/session/tests/session_encode_variation4.phpt
index d34208dd9c..bf6b0307d8 100644
--- a/ext/session/tests/session_encode_variation4.phpt
+++ b/ext/session/tests/session_encode_variation4.phpt
@@ -7,10 +7,10 @@ Test session_encode() function : variation
ob_start();
-/*
+/*
* Prototype : string session_encode(void)
* Description : Encodes the current session data as a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_encode() : variation ***\n";
@@ -27,7 +27,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_encode() : variation ***
bool(true)
string(52) "foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"
diff --git a/ext/session/tests/session_encode_variation5.phpt b/ext/session/tests/session_encode_variation5.phpt
index ec9514b650..b4854552aa 100644
--- a/ext/session/tests/session_encode_variation5.phpt
+++ b/ext/session/tests/session_encode_variation5.phpt
@@ -7,10 +7,10 @@ Test session_encode() function : variation
ob_start();
-/*
+/*
* Prototype : string session_encode(void)
* Description : Encodes the current session data as a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_encode() : variation ***\n";
@@ -27,7 +27,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_encode() : variation ***
bool(true)
string(64) "data|a:5:{i:0;i:1;i:1;i:2;i:2;i:3;s:3:"foo";R:1;s:4:"blah";R:1;}"
diff --git a/ext/session/tests/session_encode_variation6.phpt b/ext/session/tests/session_encode_variation6.phpt
index 4c3f0370fa..c5f1f4bbc3 100644
--- a/ext/session/tests/session_encode_variation6.phpt
+++ b/ext/session/tests/session_encode_variation6.phpt
@@ -7,10 +7,10 @@ Test session_encode() function : variation
ob_start();
-/*
+/*
* Prototype : string session_encode(void)
* Description : Encodes the current session data as a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_encode() : variation ***\n";
diff --git a/ext/session/tests/session_encode_variation7.phpt b/ext/session/tests/session_encode_variation7.phpt
index a982268c0c..a7ffb364be 100644
--- a/ext/session/tests/session_encode_variation7.phpt
+++ b/ext/session/tests/session_encode_variation7.phpt
@@ -9,10 +9,10 @@ session.serialize_handler=php_binary
ob_start();
-/*
+/*
* Prototype : string session_encode(void)
* Description : Encodes the current session data as a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_encode() : variation ***\n";
@@ -26,7 +26,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_encode() : variation ***
bool(true)
string(24) "A2Zvb2k6MTIzNDU2Nzg5MDs="
diff --git a/ext/session/tests/session_encode_variation8.phpt b/ext/session/tests/session_encode_variation8.phpt
index c84152cd13..7ffa948620 100644
--- a/ext/session/tests/session_encode_variation8.phpt
+++ b/ext/session/tests/session_encode_variation8.phpt
@@ -9,10 +9,10 @@ session.serialize_handler=blah
ob_start();
-/*
+/*
* Prototype : string session_encode(void)
* Description : Encodes the current session data as a string
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_encode() : variation ***\n";
diff --git a/ext/session/tests/session_get_cookie_params_basic.phpt b/ext/session/tests/session_get_cookie_params_basic.phpt
index 77f2b138df..6188e06e6d 100644
--- a/ext/session/tests/session_get_cookie_params_basic.phpt
+++ b/ext/session/tests/session_get_cookie_params_basic.phpt
@@ -8,15 +8,16 @@ session.cookie_path="/"
session.cookie_domain=""
session.cookie_secure=0
session.cookie_httponly=0
+session.cookie_samesite=""
--FILE--
<?php
ob_start();
-/*
+/*
* Prototype : array session_get_cookie_params(void)
* Description : Get the session cookie parameters
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_get_cookie_params() : basic functionality ***\n";
@@ -26,13 +27,21 @@ var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE, FALSE));
var_dump(session_get_cookie_params());
var_dump(session_set_cookie_params(1234567890, "/guff", "foo", TRUE, TRUE));
var_dump(session_get_cookie_params());
+var_dump(session_set_cookie_params([
+ "lifetime" => 123,
+ "path" => "/bar",
+ "domain" => "baz",
+ "secure" => FALSE,
+ "httponly" => FALSE,
+ "samesite" => "please"]));
+var_dump(session_get_cookie_params());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_get_cookie_params() : basic functionality ***
-array(5) {
+array(6) {
["lifetime"]=>
int(0)
["path"]=>
@@ -43,9 +52,11 @@ array(5) {
bool(false)
["httponly"]=>
bool(false)
+ ["samesite"]=>
+ string(0) ""
}
bool(true)
-array(5) {
+array(6) {
["lifetime"]=>
int(3600)
["path"]=>
@@ -56,9 +67,11 @@ array(5) {
bool(false)
["httponly"]=>
bool(false)
+ ["samesite"]=>
+ string(0) ""
}
bool(true)
-array(5) {
+array(6) {
["lifetime"]=>
int(1234567890)
["path"]=>
@@ -69,5 +82,22 @@ array(5) {
bool(true)
["httponly"]=>
bool(true)
+ ["samesite"]=>
+ string(0) ""
+}
+bool(true)
+array(6) {
+ ["lifetime"]=>
+ int(123)
+ ["path"]=>
+ string(4) "/bar"
+ ["domain"]=>
+ string(3) "baz"
+ ["secure"]=>
+ bool(false)
+ ["httponly"]=>
+ bool(false)
+ ["samesite"]=>
+ string(6) "please"
}
Done
diff --git a/ext/session/tests/session_get_cookie_params_error.phpt b/ext/session/tests/session_get_cookie_params_error.phpt
index 0cf54efb02..243536c39e 100644
--- a/ext/session/tests/session_get_cookie_params_error.phpt
+++ b/ext/session/tests/session_get_cookie_params_error.phpt
@@ -7,10 +7,10 @@ Test session_get_cookie_params() function : error functionality
ob_start();
-/*
+/*
* Prototype : array session_get_cookie_params(void)
* Description : Get the session cookie parameters
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_get_cookie_params() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_get_cookie_params_variation1.phpt b/ext/session/tests/session_get_cookie_params_variation1.phpt
index 03513c8e55..f7fd60deae 100644
--- a/ext/session/tests/session_get_cookie_params_variation1.phpt
+++ b/ext/session/tests/session_get_cookie_params_variation1.phpt
@@ -8,15 +8,16 @@ session.cookie_path="/"
session.cookie_domain=""
session.cookie_secure=0
session.cookie_httponly=0
+session.cookie_samesite=""
--FILE--
<?php
ob_start();
-/*
+/*
* Prototype : array session_get_cookie_params(void)
* Description : Get the session cookie parameters
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_get_cookie_params() : variation ***\n";
@@ -32,13 +33,15 @@ ini_set("session.cookie_secure", TRUE);
var_dump(session_get_cookie_params());
ini_set("session.cookie_httponly", TRUE);
var_dump(session_get_cookie_params());
+ini_set("session.cookie_samesite", "foo");
+var_dump(session_get_cookie_params());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_get_cookie_params() : variation ***
-array(5) {
+array(6) {
["lifetime"]=>
int(0)
["path"]=>
@@ -49,8 +52,10 @@ array(5) {
bool(false)
["httponly"]=>
bool(false)
+ ["samesite"]=>
+ string(0) ""
}
-array(5) {
+array(6) {
["lifetime"]=>
int(3600)
["path"]=>
@@ -61,8 +66,10 @@ array(5) {
bool(false)
["httponly"]=>
bool(false)
+ ["samesite"]=>
+ string(0) ""
}
-array(5) {
+array(6) {
["lifetime"]=>
int(3600)
["path"]=>
@@ -73,8 +80,10 @@ array(5) {
bool(false)
["httponly"]=>
bool(false)
+ ["samesite"]=>
+ string(0) ""
}
-array(5) {
+array(6) {
["lifetime"]=>
int(3600)
["path"]=>
@@ -85,8 +94,10 @@ array(5) {
bool(false)
["httponly"]=>
bool(false)
+ ["samesite"]=>
+ string(0) ""
}
-array(5) {
+array(6) {
["lifetime"]=>
int(3600)
["path"]=>
@@ -97,8 +108,10 @@ array(5) {
bool(true)
["httponly"]=>
bool(false)
+ ["samesite"]=>
+ string(0) ""
}
-array(5) {
+array(6) {
["lifetime"]=>
int(3600)
["path"]=>
@@ -109,6 +122,22 @@ array(5) {
bool(true)
["httponly"]=>
bool(true)
+ ["samesite"]=>
+ string(0) ""
+}
+array(6) {
+ ["lifetime"]=>
+ int(3600)
+ ["path"]=>
+ string(5) "/path"
+ ["domain"]=>
+ string(3) "foo"
+ ["secure"]=>
+ bool(true)
+ ["httponly"]=>
+ bool(true)
+ ["samesite"]=>
+ string(3) "foo"
}
Done
diff --git a/ext/session/tests/session_id_basic.phpt b/ext/session/tests/session_id_basic.phpt
index 2fc1f91e6e..32a9679e20 100644
--- a/ext/session/tests/session_id_basic.phpt
+++ b/ext/session/tests/session_id_basic.phpt
@@ -7,10 +7,10 @@ Test session_id() function : basic functionality
ob_start();
-/*
+/*
* Prototype : string session_id([string $id])
* Description : Get and/or set the current session id
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_id() : basic functionality ***\n";
@@ -30,7 +30,7 @@ var_dump(session_id());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_id() : basic functionality ***
string(0) ""
string(0) ""
diff --git a/ext/session/tests/session_id_basic2.phpt b/ext/session/tests/session_id_basic2.phpt
index 5b6acb1251..fd26c0e9ed 100644
--- a/ext/session/tests/session_id_basic2.phpt
+++ b/ext/session/tests/session_id_basic2.phpt
@@ -7,10 +7,10 @@ Test session_id() function : basic functionality
ob_start();
-/*
+/*
* Prototype : string session_id([string $id])
* Description : Get and/or set the current session id
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_id() : basic functionality ***\n";
diff --git a/ext/session/tests/session_id_error.phpt b/ext/session/tests/session_id_error.phpt
index 651092c01b..6337cb916d 100644
--- a/ext/session/tests/session_id_error.phpt
+++ b/ext/session/tests/session_id_error.phpt
@@ -7,10 +7,10 @@ Test session_id() function : error functionality
ob_start();
-/*
+/*
* Prototype : string session_id([string $id])
* Description : Get and/or set the current session id
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_id() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_id_error2.phpt b/ext/session/tests/session_id_error2.phpt
index 1349ba59f2..0d256564b6 100644
--- a/ext/session/tests/session_id_error2.phpt
+++ b/ext/session/tests/session_id_error2.phpt
@@ -15,12 +15,12 @@ ob_start();
echo "*** Testing session_id() : error functionality ***\n";
-var_dump(session_id());
-var_dump(session_start());
var_dump(session_id("test"));
var_dump(session_id());
var_dump(session_id("1234567890"));
var_dump(session_id());
+var_dump(session_start());
+var_dump(session_id("1234567890"));
var_dump(session_destroy());
var_dump(session_id());
@@ -30,12 +30,13 @@ ob_end_flush();
--EXPECTF--
*** Testing session_id() : error functionality ***
string(0) ""
-bool(true)
-string(%d) "%s"
string(4) "test"
string(4) "test"
string(10) "1234567890"
bool(true)
+
+Warning: session_id(): Cannot change session id when session is active in %s on line %d
+bool(false)
+bool(true)
string(0) ""
Done
-
diff --git a/ext/session/tests/session_id_error3.phpt b/ext/session/tests/session_id_error3.phpt
index 79b75a1b77..aeb0fe38a0 100644
--- a/ext/session/tests/session_id_error3.phpt
+++ b/ext/session/tests/session_id_error3.phpt
@@ -7,73 +7,73 @@ Test session_id() function : error functionality
ob_start();
-/*
+/*
* Prototype : string session_id([string $id])
* Description : Get and/or set the current session id
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_id() : error functionality ***\n";
-@session_start();
var_dump(session_id());
var_dump(session_id("!"));
var_dump(session_id());
+@session_start();
@session_destroy();
-@session_start();
var_dump(session_id());
var_dump(session_id("?><"));
var_dump(session_id());
+@session_start();
@session_destroy();
-@session_start();
var_dump(session_id());
-var_dump(session_id("£$%^&*()"));
+var_dump(session_id("\xa3$%^&*()"));
var_dump(session_id());
+@session_start();
@session_destroy();
-@session_start();
var_dump(session_id());
var_dump(session_id("\r\n"));
var_dump(session_id());
+@session_start();
@session_destroy();
-@session_start();
var_dump(session_id());
var_dump(session_id("\0"));
var_dump(session_id());
+@session_start();
@session_destroy();
-@session_start();
var_dump(session_id());
-var_dump(session_id("¬``@~:{>?><,./[]+--"));
+var_dump(session_id("\xac``@~:{>?><,./[]+--"));
var_dump(session_id());
+@session_start();
@session_destroy();
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_id() : error functionality ***
-string(%d) "%s"
-string(%d) "%s"
+string(0) ""
+string(0) ""
string(1) "!"
-string(%d) "%s"
-string(%d) "%s"
+string(0) ""
+string(0) ""
string(3) "?><"
-string(%d) "%s"
-string(%d) "%s"
+string(0) ""
+string(0) ""
string(8) "£$%^&*()"
-string(%d) "%s"
-string(%d) "%s"
+string(0) ""
+string(0) ""
string(2) "
"
-string(%d) "%s"
-string(%d) "%s"
string(0) ""
-string(%d) "%s"
-string(%d) "%s"
+string(0) ""
+string(0) ""
+string(0) ""
+string(0) ""
string(19) "¬``@~:{>?><,./[]+--"
Done
diff --git a/ext/session/tests/session_module_name_basic.phpt b/ext/session/tests/session_module_name_basic.phpt
index 8d8bf70573..2daf6fc620 100644
--- a/ext/session/tests/session_module_name_basic.phpt
+++ b/ext/session/tests/session_module_name_basic.phpt
@@ -7,10 +7,10 @@ Test session_module_name() function : basic functionality
ob_start();
-/*
+/*
* Prototype : string session_module_name([string $module])
* Description : Get and/or set the current session module
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_module_name() : basic functionality ***\n";
diff --git a/ext/session/tests/session_module_name_error.phpt b/ext/session/tests/session_module_name_error.phpt
index 6940445969..08c080a1fa 100644
--- a/ext/session/tests/session_module_name_error.phpt
+++ b/ext/session/tests/session_module_name_error.phpt
@@ -7,10 +7,10 @@ Test session_module_name() function : error functionality
ob_start();
-/*
+/*
* Prototype : string session_module_name([string $module])
* Description : Get and/or set the current session module
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_module_name() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_module_name_variation1.phpt b/ext/session/tests/session_module_name_variation1.phpt
index 59d9112a55..2034b7eff1 100644
--- a/ext/session/tests/session_module_name_variation1.phpt
+++ b/ext/session/tests/session_module_name_variation1.phpt
@@ -7,10 +7,10 @@ Test session_module_name() function : variation
ob_start();
-/*
+/*
* Prototype : string session_module_name([string $module])
* Description : Get and/or set the current session module
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_module_name() : variation ***\n";
diff --git a/ext/session/tests/session_module_name_variation2.phpt b/ext/session/tests/session_module_name_variation2.phpt
index b14c0c2aac..aa7b33c767 100644
--- a/ext/session/tests/session_module_name_variation2.phpt
+++ b/ext/session/tests/session_module_name_variation2.phpt
@@ -7,10 +7,10 @@ Test session_module_name() function : variation
ob_start();
-/*
+/*
* Prototype : string session_module_name([string $module])
* Description : Get and/or set the current session module
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_module_name() : variation ***\n";
diff --git a/ext/session/tests/session_module_name_variation3.phpt b/ext/session/tests/session_module_name_variation3.phpt
index b03173cecf..09beaa4059 100644
--- a/ext/session/tests/session_module_name_variation3.phpt
+++ b/ext/session/tests/session_module_name_variation3.phpt
@@ -11,14 +11,14 @@ session.save_handler=files
ob_start();
-/*
+/*
* Prototype : string session_module_name([string $module])
* Description : Get and/or set the current session module
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_module_name() : variation ***\n";
-function open($save_path, $session_name) {
+function open($save_path, $session_name) {
throw new Exception("Stop...!");
}
diff --git a/ext/session/tests/session_module_name_variation4.phpt b/ext/session/tests/session_module_name_variation4.phpt
index 4e2dcd7cbb..70b644be58 100644
--- a/ext/session/tests/session_module_name_variation4.phpt
+++ b/ext/session/tests/session_module_name_variation4.phpt
@@ -11,10 +11,10 @@ session.gc_maxlifetime=0
ob_start();
-/*
+/*
* Prototype : string session_module_name([string $module])
* Description : Get and/or set the current session module
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_module_name() : variation ***\n";
@@ -40,7 +40,7 @@ var_dump(session_destroy());
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_module_name() : variation ***
array(3) {
["Blah"]=>
diff --git a/ext/session/tests/session_name_basic.phpt b/ext/session/tests/session_name_basic.phpt
index 028c5c106b..50cefe2812 100644
--- a/ext/session/tests/session_name_basic.phpt
+++ b/ext/session/tests/session_name_basic.phpt
@@ -11,10 +11,10 @@ session.save_handler=files
ob_start();
-/*
+/*
* Prototype : string session_name([string $name])
* Description : Get and/or set the current session name
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_name() : error functionality ***\n";
@@ -29,7 +29,7 @@ var_dump(session_name());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_name() : error functionality ***
string(9) "PHPSESSID"
string(9) "PHPSESSID"
diff --git a/ext/session/tests/session_name_error.phpt b/ext/session/tests/session_name_error.phpt
index 2d1f656b1d..9f0101d98b 100644
--- a/ext/session/tests/session_name_error.phpt
+++ b/ext/session/tests/session_name_error.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : string session_name([string $name])
* Description : Get and/or set the current session name
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_name() : error functionality ***\n";
@@ -60,7 +60,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -69,7 +69,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_name_variation1.phpt b/ext/session/tests/session_name_variation1.phpt
index 901a472e3c..7809e60b4d 100644
--- a/ext/session/tests/session_name_variation1.phpt
+++ b/ext/session/tests/session_name_variation1.phpt
@@ -11,10 +11,10 @@ session.save_handler=files
ob_start();
-/*
+/*
* Prototype : string session_name([string $name])
* Description : Get and/or set the current session name
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_name() : variation ***\n";
diff --git a/ext/session/tests/session_name_variation2.phpt b/ext/session/tests/session_name_variation2.phpt
index f355b79129..536a9d31a5 100644
--- a/ext/session/tests/session_name_variation2.phpt
+++ b/ext/session/tests/session_name_variation2.phpt
@@ -3,16 +3,16 @@ Test session_name() function : variation
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
-session.name=blah
+session.name=blah
--FILE--
<?php
ob_start();
-/*
+/*
* Prototype : string session_name([string $name])
* Description : Get and/or set the current session name
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_name() : variation ***\n";
@@ -27,7 +27,7 @@ var_dump(session_name());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_name() : variation ***
string(4) "blah"
string(4) "blah"
diff --git a/ext/session/tests/session_regenerate_id_basic.phpt b/ext/session/tests/session_regenerate_id_basic.phpt
index 7121500db1..cdf2bb1f2b 100644
--- a/ext/session/tests/session_regenerate_id_basic.phpt
+++ b/ext/session/tests/session_regenerate_id_basic.phpt
@@ -7,10 +7,10 @@ Test session_regenerate_id() function : basic functionality
ob_start();
-/*
+/*
* Prototype : bool session_regenerate_id([bool $delete_old_session])
- * Description : Update the current session id with a newly generated one
- * Source code : ext/session/session.c
+ * Description : Update the current session id with a newly generated one
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_regenerate_id() : basic functionality ***\n";
diff --git a/ext/session/tests/session_regenerate_id_error.phpt b/ext/session/tests/session_regenerate_id_error.phpt
index b11f310b0b..71ef13471e 100644
--- a/ext/session/tests/session_regenerate_id_error.phpt
+++ b/ext/session/tests/session_regenerate_id_error.phpt
@@ -7,10 +7,10 @@ Test session_regenerate_id() function : error functionality
ob_start();
-/*
+/*
* Prototype : bool session_regenerate_id([bool $delete_old_session])
- * Description : Update the current session id with a newly generated one
- * Source code : ext/session/session.c
+ * Description : Update the current session id with a newly generated one
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_regenerate_id() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
@@ -197,7 +197,7 @@ bool(false)
-- Iteration 21 --
-Warning: session_regenerate_id() expects parameter 1 to be boolean, object given in %s on line %d
+Warning: session_regenerate_id() expects parameter 1 to be bool, object given in %s on line %d
NULL
-- Iteration 22 --
@@ -212,7 +212,7 @@ bool(false)
-- Iteration 24 --
-Warning: session_regenerate_id() expects parameter 1 to be boolean, resource given in %s on line %d
+Warning: session_regenerate_id() expects parameter 1 to be bool, resource given in %s on line %d
NULL
Done
diff --git a/ext/session/tests/session_regenerate_id_variation1.phpt b/ext/session/tests/session_regenerate_id_variation1.phpt
index a5670341af..ca0ef35b10 100644
--- a/ext/session/tests/session_regenerate_id_variation1.phpt
+++ b/ext/session/tests/session_regenerate_id_variation1.phpt
@@ -7,10 +7,10 @@ Test session_regenerate_id() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_regenerate_id([bool $delete_old_session])
- * Description : Update the current session id with a newly generated one
- * Source code : ext/session/session.c
+ * Description : Update the current session id with a newly generated one
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_regenerate_id() : variation ***\n";
diff --git a/ext/session/tests/session_reset_basic.phpt b/ext/session/tests/session_reset_basic.phpt
index 1fb7f8fe87..a2ddc7af34 100644
--- a/ext/session/tests/session_reset_basic.phpt
+++ b/ext/session/tests/session_reset_basic.phpt
@@ -35,7 +35,7 @@ var_dump($_SESSION); // Should only have 'foo'
echo "Done".PHP_EOL;
?>
---EXPECTF--
+--EXPECT--
*** Testing session_abort() : basic functionality ***
array(2) {
["foo"]=>
diff --git a/ext/session/tests/session_save_path_basic.phpt b/ext/session/tests/session_save_path_basic.phpt
index 08acf5a3f5..2895f46c0b 100644
--- a/ext/session/tests/session_save_path_basic.phpt
+++ b/ext/session/tests/session_save_path_basic.phpt
@@ -11,10 +11,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : string session_save_path([string $path])
* Description : Get and/or set the current session save path
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_save_path() : error functionality ***\n";
diff --git a/ext/session/tests/session_save_path_error.phpt b/ext/session/tests/session_save_path_error.phpt
index 809f0a7320..7a2061083a 100644
--- a/ext/session/tests/session_save_path_error.phpt
+++ b/ext/session/tests/session_save_path_error.phpt
@@ -12,10 +12,10 @@ session.save_handler=files
ob_start();
-/*
+/*
* Prototype : string session_save_path([string $path])
* Description : Get and/or set the current session save path
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_save_path() : error functionality ***\n";
@@ -62,7 +62,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -71,7 +71,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_save_path_variation2.phpt b/ext/session/tests/session_save_path_variation2.phpt
index b8fb86509f..60675aec3c 100644
--- a/ext/session/tests/session_save_path_variation2.phpt
+++ b/ext/session/tests/session_save_path_variation2.phpt
@@ -10,10 +10,10 @@ session.gc_probability=0
ob_start();
-/*
+/*
* Prototype : string session_save_path([string $path])
* Description : Get and/or set the current session save path
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_save_path() : variation ***\n";
diff --git a/ext/session/tests/session_save_path_variation3.phpt b/ext/session/tests/session_save_path_variation3.phpt
index e369b12e0a..1d290d95b3 100644
--- a/ext/session/tests/session_save_path_variation3.phpt
+++ b/ext/session/tests/session_save_path_variation3.phpt
@@ -10,10 +10,10 @@ session.gc_probability=0
ob_start();
-/*
+/*
* Prototype : string session_save_path([string $path])
* Description : Get and/or set the current session save path
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_save_path() : variation ***\n";
diff --git a/ext/session/tests/session_save_path_variation4.phpt b/ext/session/tests/session_save_path_variation4.phpt
index 1cb86e1c30..8cbee49afb 100644
--- a/ext/session/tests/session_save_path_variation4.phpt
+++ b/ext/session/tests/session_save_path_variation4.phpt
@@ -12,10 +12,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : string session_save_path([string $path])
* Description : Get and/or set the current session save path
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_save_path() : variation ***\n";
diff --git a/ext/session/tests/session_save_path_variation5.phpt b/ext/session/tests/session_save_path_variation5.phpt
index 1dd86f8afa..c015dcc95c 100644
--- a/ext/session/tests/session_save_path_variation5.phpt
+++ b/ext/session/tests/session_save_path_variation5.phpt
@@ -1,7 +1,7 @@
--TEST--
Test session_save_path() function : variation
--SKIPIF--
-<?php include('skipif.inc');
+<?php include('skipif.inc');
if(substr(PHP_OS, 0, 3) == "WIN")
die("skip Not for Windows");
?>
@@ -13,10 +13,10 @@ session.name=PHPSESSID
<?php
ob_start();
-/*
+/*
* Prototype : string session_save_path([string $path])
* Description : Get and/or set the current session save path
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_save_path() : variation ***\n";
diff --git a/ext/session/tests/session_set_cookie_params_basic.phpt b/ext/session/tests/session_set_cookie_params_basic.phpt
index e40c4e77b7..a67aaa2bc4 100644
--- a/ext/session/tests/session_set_cookie_params_basic.phpt
+++ b/ext/session/tests/session_set_cookie_params_basic.phpt
@@ -7,10 +7,10 @@ Test session_set_cookie_params() function : basic functionality
ob_start();
-/*
+/*
* Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
* Description : Set the session cookie parameters
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_cookie_params() : basic functionality ***\n";
diff --git a/ext/session/tests/session_set_cookie_params_error.phpt b/ext/session/tests/session_set_cookie_params_error.phpt
index a1b12cac7b..cb9d1a5eaa 100644
--- a/ext/session/tests/session_set_cookie_params_error.phpt
+++ b/ext/session/tests/session_set_cookie_params_error.phpt
@@ -7,10 +7,10 @@ Test session_set_cookie_params() function : error functionality
ob_start();
-/*
+/*
* Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
* Description : Set the session cookie parameters
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_cookie_params() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
@@ -268,10 +268,10 @@ bool(true)
bool(true)
bool(true)
-Warning: session_set_cookie_params() expects parameter 4 to be boolean, object given in %s on line 84
+Warning: session_set_cookie_params() expects parameter 4 to be bool, object given in %s on line 84
NULL
-Warning: session_set_cookie_params() expects parameter 5 to be boolean, object given in %s on line 85
+Warning: session_set_cookie_params() expects parameter 5 to be bool, object given in %s on line 85
NULL
bool(true)
@@ -300,10 +300,10 @@ NULL
Warning: session_set_cookie_params() expects parameter 3 to be string, resource given in %s on line 83
NULL
-Warning: session_set_cookie_params() expects parameter 4 to be boolean, resource given in %s on line 84
+Warning: session_set_cookie_params() expects parameter 4 to be bool, resource given in %s on line 84
NULL
-Warning: session_set_cookie_params() expects parameter 5 to be boolean, resource given in %s on line 85
+Warning: session_set_cookie_params() expects parameter 5 to be bool, resource given in %s on line 85
NULL
bool(true)
Done
diff --git a/ext/session/tests/session_set_cookie_params_variation1.phpt b/ext/session/tests/session_set_cookie_params_variation1.phpt
index 46ec780e9d..93ac056d89 100644
--- a/ext/session/tests/session_set_cookie_params_variation1.phpt
+++ b/ext/session/tests/session_set_cookie_params_variation1.phpt
@@ -9,10 +9,10 @@ session.cookie_lifetime=3600
ob_start();
-/*
+/*
* Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
* Description : Set the session cookie parameters
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_cookie_params() : variation ***\n";
diff --git a/ext/session/tests/session_set_cookie_params_variation2.phpt b/ext/session/tests/session_set_cookie_params_variation2.phpt
index 07bb5cfdf5..1bf9bae848 100644
--- a/ext/session/tests/session_set_cookie_params_variation2.phpt
+++ b/ext/session/tests/session_set_cookie_params_variation2.phpt
@@ -9,10 +9,10 @@ session.cookie_path=/path
ob_start();
-/*
+/*
* Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
* Description : Set the session cookie parameters
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_cookie_params() : variation ***\n";
diff --git a/ext/session/tests/session_set_cookie_params_variation3.phpt b/ext/session/tests/session_set_cookie_params_variation3.phpt
index 5a4e2df8fd..17d1e6a771 100644
--- a/ext/session/tests/session_set_cookie_params_variation3.phpt
+++ b/ext/session/tests/session_set_cookie_params_variation3.phpt
@@ -9,10 +9,10 @@ session.cookie_domain=foo
ob_start();
-/*
+/*
* Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
* Description : Set the session cookie parameters
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_cookie_params() : variation ***\n";
diff --git a/ext/session/tests/session_set_cookie_params_variation4.phpt b/ext/session/tests/session_set_cookie_params_variation4.phpt
index ab0de3bd8b..2b10f3cc82 100644
--- a/ext/session/tests/session_set_cookie_params_variation4.phpt
+++ b/ext/session/tests/session_set_cookie_params_variation4.phpt
@@ -9,10 +9,10 @@ session.cookie_secure=TRUE
ob_start();
-/*
+/*
* Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
* Description : Set the session cookie parameters
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_cookie_params() : variation ***\n";
diff --git a/ext/session/tests/session_set_cookie_params_variation5.phpt b/ext/session/tests/session_set_cookie_params_variation5.phpt
index f630a5ff4a..ffdd29db2d 100644
--- a/ext/session/tests/session_set_cookie_params_variation5.phpt
+++ b/ext/session/tests/session_set_cookie_params_variation5.phpt
@@ -9,10 +9,10 @@ session.cookie_httponly=TRUE
ob_start();
-/*
+/*
* Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]])
* Description : Set the session cookie parameters
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_cookie_params() : variation ***\n";
diff --git a/ext/session/tests/session_set_cookie_params_variation6.phpt b/ext/session/tests/session_set_cookie_params_variation6.phpt
new file mode 100644
index 0000000000..b94380d370
--- /dev/null
+++ b/ext/session/tests/session_set_cookie_params_variation6.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Test session_set_cookie_params() function : variation
+--INI--
+session.cookie_samesite=test
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : void session_set_cookie_params(array $options)
+ * Description : Set the session cookie parameters
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_cookie_params() : variation ***\n";
+
+var_dump(ini_get("session.cookie_samesite"));
+var_dump(session_set_cookie_params(["samesite" => "nothing"]));
+var_dump(ini_get("session.cookie_samesite"));
+var_dump(session_start());
+var_dump(ini_get("session.cookie_samesite"));
+var_dump(session_set_cookie_params(["samesite" => "test"]));
+var_dump(ini_get("session.cookie_samesite"));
+var_dump(session_destroy());
+var_dump(ini_get("session.cookie_samesite"));
+var_dump(session_set_cookie_params(["samesite" => "other"]));
+var_dump(ini_get("session.cookie_samesite"));
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_cookie_params() : variation ***
+string(4) "test"
+bool(true)
+string(7) "nothing"
+bool(true)
+string(7) "nothing"
+
+Warning: session_set_cookie_params(): Cannot change session cookie parameters when session is active in %s on line 18
+bool(false)
+string(7) "nothing"
+bool(true)
+string(7) "nothing"
+bool(true)
+string(5) "other"
+Done
diff --git a/ext/session/tests/session_set_cookie_params_variation7.phpt b/ext/session/tests/session_set_cookie_params_variation7.phpt
new file mode 100644
index 0000000000..1ab248908a
--- /dev/null
+++ b/ext/session/tests/session_set_cookie_params_variation7.phpt
@@ -0,0 +1,71 @@
+--TEST--
+Test session_set_cookie_params() function : array parameter variation
+--INI--
+session.cookie_lifetime=0
+session.cookie_path="/"
+session.cookie_domain=""
+session.cookie_secure=0
+session.cookie_httponly=0
+session.cookie_samesite=""
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : void session_set_cookie_params(array $options)
+ * Description : Set the session cookie parameters
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_set_cookie_params() : array parameter variation ***\n";
+
+// Invalid cases
+var_dump(session_set_cookie_params([]));
+var_dump(session_set_cookie_params(["unknown_key" => true, "secure_invalid" => true]));
+
+var_dump(ini_get("session.cookie_secure"));
+var_dump(ini_get("session.cookie_samesite"));
+var_dump(session_set_cookie_params(["secure" => true, "samesite" => "please"]));
+var_dump(ini_get("session.cookie_secure"));
+var_dump(ini_get("session.cookie_samesite"));
+
+var_dump(ini_get("session.cookie_lifetime"));
+var_dump(session_set_cookie_params(["lifetime" => 42]));
+var_dump(ini_get("session.cookie_lifetime"));
+
+var_dump(ini_get("session.cookie_path"));
+var_dump(session_set_cookie_params(["path" => "newpath/"], "arg after options array"));
+var_dump(ini_get("session.cookie_path"));
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_set_cookie_params() : array parameter variation ***
+
+Warning: session_set_cookie_params(): No valid keys were found in the options array in %s
+bool(false)
+
+Warning: session_set_cookie_params(): Unrecognized key 'unknown_key' found in the options array in %s
+
+Warning: session_set_cookie_params(): Unrecognized key 'secure_invalid' found in the options array in %s
+
+Warning: session_set_cookie_params(): No valid keys were found in the options array in %s
+bool(false)
+string(1) "0"
+string(0) ""
+bool(true)
+string(1) "1"
+string(6) "please"
+string(1) "0"
+bool(true)
+string(2) "42"
+string(1) "/"
+
+Warning: session_set_cookie_params(): Cannot pass arguments after the options array in %s
+bool(false)
+string(1) "/"
+Done
diff --git a/ext/session/tests/session_set_save_handler_basic.phpt b/ext/session/tests/session_set_save_handler_basic.phpt
index bf77e77a6e..87156bea7f 100644
--- a/ext/session/tests/session_set_save_handler_basic.phpt
+++ b/ext/session/tests/session_set_save_handler_basic.phpt
@@ -12,10 +12,10 @@ session.save_handler=files
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : basic functionality ***\n";
diff --git a/ext/session/tests/session_set_save_handler_class_001.phpt b/ext/session/tests/session_set_save_handler_class_001.phpt
index 94ab5f8247..c46d07f9b7 100644
--- a/ext/session/tests/session_set_save_handler_class_001.phpt
+++ b/ext/session/tests/session_set_save_handler_class_001.phpt
@@ -11,10 +11,10 @@ session.save_handler=files
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : basic class wrapping existing handler ***\n";
diff --git a/ext/session/tests/session_set_save_handler_class_002.phpt b/ext/session/tests/session_set_save_handler_class_002.phpt
index fe34376673..880bc33425 100644
--- a/ext/session/tests/session_set_save_handler_class_002.phpt
+++ b/ext/session/tests/session_set_save_handler_class_002.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : full handler implementation ***\n";
diff --git a/ext/session/tests/session_set_save_handler_class_003.phpt b/ext/session/tests/session_set_save_handler_class_003.phpt
index b6b179913a..29b3846851 100644
--- a/ext/session/tests/session_set_save_handler_class_003.phpt
+++ b/ext/session/tests/session_set_save_handler_class_003.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : inheritance ***\n";
diff --git a/ext/session/tests/session_set_save_handler_class_004.phpt b/ext/session/tests/session_set_save_handler_class_004.phpt
index 71ebff2eca..103b13baa7 100644
--- a/ext/session/tests/session_set_save_handler_class_004.phpt
+++ b/ext/session/tests/session_set_save_handler_class_004.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : default object ***\n";
diff --git a/ext/session/tests/session_set_save_handler_class_005.phpt b/ext/session/tests/session_set_save_handler_class_005.phpt
index e788ad1197..b195fc4a53 100644
--- a/ext/session/tests/session_set_save_handler_class_005.phpt
+++ b/ext/session/tests/session_set_save_handler_class_005.phpt
@@ -11,10 +11,10 @@ session.gc_probability=0
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : incomplete implementation ***\n";
diff --git a/ext/session/tests/session_set_save_handler_class_006.phpt b/ext/session/tests/session_set_save_handler_class_006.phpt
index 3f86437207..5830b6d4fa 100644
--- a/ext/session/tests/session_set_save_handler_class_006.phpt
+++ b/ext/session/tests/session_set_save_handler_class_006.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : using objects in close ***\n";
diff --git a/ext/session/tests/session_set_save_handler_class_007.phpt b/ext/session/tests/session_set_save_handler_class_007.phpt
index 0416a894c6..55f722515e 100644
--- a/ext/session/tests/session_set_save_handler_class_007.phpt
+++ b/ext/session/tests/session_set_save_handler_class_007.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : manual shutdown, reopen ***\n";
diff --git a/ext/session/tests/session_set_save_handler_class_008.phpt b/ext/session/tests/session_set_save_handler_class_008.phpt
index da9611a8c7..28cb692f0e 100644
--- a/ext/session/tests/session_set_save_handler_class_008.phpt
+++ b/ext/session/tests/session_set_save_handler_class_008.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : manual shutdown ***\n";
diff --git a/ext/session/tests/session_set_save_handler_class_009.phpt b/ext/session/tests/session_set_save_handler_class_009.phpt
index d878450540..a8b57dc541 100644
--- a/ext/session/tests/session_set_save_handler_class_009.phpt
+++ b/ext/session/tests/session_set_save_handler_class_009.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : implicit shutdown ***\n";
diff --git a/ext/session/tests/session_set_save_handler_class_010.phpt b/ext/session/tests/session_set_save_handler_class_010.phpt
index 2424a08d68..02304f4974 100644
--- a/ext/session/tests/session_set_save_handler_class_010.phpt
+++ b/ext/session/tests/session_set_save_handler_class_010.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : manual shutdown function ***\n";
diff --git a/ext/session/tests/session_set_save_handler_class_011.phpt b/ext/session/tests/session_set_save_handler_class_011.phpt
index d1f7dbe91f..2be99e2add 100644
--- a/ext/session/tests/session_set_save_handler_class_011.phpt
+++ b/ext/session/tests/session_set_save_handler_class_011.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : shutdown failure ***\n";
@@ -57,7 +57,7 @@ $_SESSION['foo'] = 'bar';
echo "done\n";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_set_save_handler() : shutdown failure ***
(#1) constructor called
done
diff --git a/ext/session/tests/session_set_save_handler_class_012.phpt b/ext/session/tests/session_set_save_handler_class_012.phpt
index c901385edb..3671cebe2b 100644
--- a/ext/session/tests/session_set_save_handler_class_012.phpt
+++ b/ext/session/tests/session_set_save_handler_class_012.phpt
@@ -11,10 +11,10 @@ session.gc_probability=0
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : incorrect arguments for existing handler open ***\n";
diff --git a/ext/session/tests/session_set_save_handler_class_013.phpt b/ext/session/tests/session_set_save_handler_class_013.phpt
index c882e90204..f536aa72ac 100644
--- a/ext/session/tests/session_set_save_handler_class_013.phpt
+++ b/ext/session/tests/session_set_save_handler_class_013.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : incorrect arguments for existing handler close ***\n";
diff --git a/ext/session/tests/session_set_save_handler_class_014.phpt b/ext/session/tests/session_set_save_handler_class_014.phpt
index e967082965..a96367c13a 100644
--- a/ext/session/tests/session_set_save_handler_class_014.phpt
+++ b/ext/session/tests/session_set_save_handler_class_014.phpt
@@ -13,10 +13,10 @@ include('skipif.inc');
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : calling default handler when save_handler=user ***\n";
@@ -27,7 +27,7 @@ session_set_save_handler($handler);
session_start();
---EXPECTF--
+--EXPECT--
PHP Recoverable fatal error: PHP Startup: Cannot set 'user' save handler by ini_set() or session_module_name() in Unknown on line 0
*** Testing session_set_save_handler() : calling default handler when save_handler=user ***
diff --git a/ext/session/tests/session_set_save_handler_class_015.phpt b/ext/session/tests/session_set_save_handler_class_015.phpt
index 6eaccf460f..146984175e 100644
--- a/ext/session/tests/session_set_save_handler_class_015.phpt
+++ b/ext/session/tests/session_set_save_handler_class_015.phpt
@@ -10,15 +10,15 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandler $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : register session handler but don't start ***\n";
session_set_save_handler(new SessionHandler);
---EXPECTF--
+--EXPECT--
*** Testing session_set_save_handler() : register session handler but don't start ***
diff --git a/ext/session/tests/session_set_save_handler_class_017.phpt b/ext/session/tests/session_set_save_handler_class_017.phpt
index 720541f3fc..b8e7d7a7ad 100644
--- a/ext/session/tests/session_set_save_handler_class_017.phpt
+++ b/ext/session/tests/session_set_save_handler_class_017.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandlerInterface $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() function: class with create_sid ***\n";
diff --git a/ext/session/tests/session_set_save_handler_closures.phpt b/ext/session/tests/session_set_save_handler_closures.phpt
index 77bbf6caff..f427ebf9a5 100644
--- a/ext/session/tests/session_set_save_handler_closures.phpt
+++ b/ext/session/tests/session_set_save_handler_closures.phpt
@@ -11,10 +11,10 @@ session.save_handler=files
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : using closures as callbacks ***\n";
diff --git a/ext/session/tests/session_set_save_handler_error.phpt b/ext/session/tests/session_set_save_handler_error.phpt
index 2249d1e5a2..bf9d25de59 100644
--- a/ext/session/tests/session_set_save_handler_error.phpt
+++ b/ext/session/tests/session_set_save_handler_error.phpt
@@ -7,10 +7,10 @@ Test session_set_save_handler() function : error functionality
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_set_save_handler_error2.phpt b/ext/session/tests/session_set_save_handler_error2.phpt
index 23df128f12..fb1673e0ce 100644
--- a/ext/session/tests/session_set_save_handler_error2.phpt
+++ b/ext/session/tests/session_set_save_handler_error2.phpt
@@ -9,10 +9,10 @@ error_reporting=0
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : error functionality ***\n";
@@ -41,7 +41,7 @@ session_destroy();
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_set_save_handler() : error functionality ***
array(3) {
["Blah"]=>
diff --git a/ext/session/tests/session_set_save_handler_error3.phpt b/ext/session/tests/session_set_save_handler_error3.phpt
index ecb5e5a91d..2f2659557b 100644
--- a/ext/session/tests/session_set_save_handler_error3.phpt
+++ b/ext/session/tests/session_set_save_handler_error3.phpt
@@ -11,14 +11,14 @@ session.save_handler=files
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : error functionality ***\n";
-function open($save_path, $session_name) {
+function open($save_path, $session_name) {
throw new Exception("Do something bad..!");
}
diff --git a/ext/session/tests/session_set_save_handler_error4.phpt b/ext/session/tests/session_set_save_handler_error4.phpt
index 00fb2976e3..4267195ee1 100644
--- a/ext/session/tests/session_set_save_handler_error4.phpt
+++ b/ext/session/tests/session_set_save_handler_error4.phpt
@@ -7,10 +7,10 @@ Test session_set_save_handler() function : error functionality
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : error functionality ***\n";
diff --git a/ext/session/tests/session_set_save_handler_iface_001.phpt b/ext/session/tests/session_set_save_handler_iface_001.phpt
index bfc9e2fa82..6943d59cbe 100644
--- a/ext/session/tests/session_set_save_handler_iface_001.phpt
+++ b/ext/session/tests/session_set_save_handler_iface_001.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandlerInterface $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() function: interface ***\n";
diff --git a/ext/session/tests/session_set_save_handler_iface_002.phpt b/ext/session/tests/session_set_save_handler_iface_002.phpt
index 0000c50add..204d88c785 100644
--- a/ext/session/tests/session_set_save_handler_iface_002.phpt
+++ b/ext/session/tests/session_set_save_handler_iface_002.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandlerInterface $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() function: interface wrong ***\n";
diff --git a/ext/session/tests/session_set_save_handler_iface_003.phpt b/ext/session/tests/session_set_save_handler_iface_003.phpt
index 9e0ce33616..4d7ed3b7ee 100644
--- a/ext/session/tests/session_set_save_handler_iface_003.phpt
+++ b/ext/session/tests/session_set_save_handler_iface_003.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandlerInterface $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() function: id interface ***\n";
diff --git a/ext/session/tests/session_set_save_handler_variation1.phpt b/ext/session/tests/session_set_save_handler_variation1.phpt
index 3362adbac5..fe1d2b0b5a 100644
--- a/ext/session/tests/session_set_save_handler_variation1.phpt
+++ b/ext/session/tests/session_set_save_handler_variation1.phpt
@@ -7,10 +7,10 @@ Test session_set_save_handler() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : variation ***\n";
diff --git a/ext/session/tests/session_set_save_handler_variation2.phpt b/ext/session/tests/session_set_save_handler_variation2.phpt
index 1e8a8f51c1..976d796f5c 100644
--- a/ext/session/tests/session_set_save_handler_variation2.phpt
+++ b/ext/session/tests/session_set_save_handler_variation2.phpt
@@ -7,10 +7,10 @@ Test session_set_save_handler() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : variation ***\n";
diff --git a/ext/session/tests/session_set_save_handler_variation3.phpt b/ext/session/tests/session_set_save_handler_variation3.phpt
index 9af87dd170..6afa753b90 100644
--- a/ext/session/tests/session_set_save_handler_variation3.phpt
+++ b/ext/session/tests/session_set_save_handler_variation3.phpt
@@ -9,10 +9,10 @@ session.auto_start=1
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : variation ***\n";
diff --git a/ext/session/tests/session_set_save_handler_variation4.phpt b/ext/session/tests/session_set_save_handler_variation4.phpt
index 8f9951c1e8..be8425d245 100644
--- a/ext/session/tests/session_set_save_handler_variation4.phpt
+++ b/ext/session/tests/session_set_save_handler_variation4.phpt
@@ -14,10 +14,10 @@ session.save_handler=files
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() : variation ***\n";
@@ -80,7 +80,7 @@ array(3) {
}
Destroy [%s,%s]
-Warning: unlink(%s): No such file or directory in %s on line %s
+Warning: unlink(%s): No such file or directory in %s on line %d
Close [%s,PHPSESSID]
bool(true)
diff --git a/ext/session/tests/session_start_error.phpt b/ext/session/tests/session_start_error.phpt
index 719e202c11..61d702f5f5 100644
--- a/ext/session/tests/session_start_error.phpt
+++ b/ext/session/tests/session_start_error.phpt
@@ -7,10 +7,10 @@ Test session_start() function : error functionality
ob_start();
-/*
+/*
* Prototype : bool session_start(void)
* Description : Initialize session data
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_start() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
@@ -98,7 +98,7 @@ ob_end_flush();
-- Iteration 1 --
-Warning: session_start() expects parameter 1 to be array, integer given in %s on line %d
+Warning: session_start() expects parameter 1 to be array, int given in %s on line %d
bool(false)
Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
@@ -106,7 +106,7 @@ bool(false)
-- Iteration 2 --
-Warning: session_start() expects parameter 1 to be array, integer given in %s on line %d
+Warning: session_start() expects parameter 1 to be array, int given in %s on line %d
bool(false)
Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
@@ -114,7 +114,7 @@ bool(false)
-- Iteration 3 --
-Warning: session_start() expects parameter 1 to be array, integer given in %s on line %d
+Warning: session_start() expects parameter 1 to be array, int given in %s on line %d
bool(false)
Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
@@ -122,7 +122,7 @@ bool(false)
-- Iteration 4 --
-Warning: session_start() expects parameter 1 to be array, integer given in %s on line %d
+Warning: session_start() expects parameter 1 to be array, int given in %s on line %d
bool(false)
Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
@@ -186,7 +186,7 @@ bool(false)
-- Iteration 12 --
-Warning: session_start() expects parameter 1 to be array, boolean given in %s on line %d
+Warning: session_start() expects parameter 1 to be array, bool given in %s on line %d
bool(false)
Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
@@ -194,7 +194,7 @@ bool(false)
-- Iteration 13 --
-Warning: session_start() expects parameter 1 to be array, boolean given in %s on line %d
+Warning: session_start() expects parameter 1 to be array, bool given in %s on line %d
bool(false)
Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
@@ -202,7 +202,7 @@ bool(false)
-- Iteration 14 --
-Warning: session_start() expects parameter 1 to be array, boolean given in %s on line %d
+Warning: session_start() expects parameter 1 to be array, bool given in %s on line %d
bool(false)
Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
@@ -210,7 +210,7 @@ bool(false)
-- Iteration 15 --
-Warning: session_start() expects parameter 1 to be array, boolean given in %s on line %d
+Warning: session_start() expects parameter 1 to be array, bool given in %s on line %d
bool(false)
Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
diff --git a/ext/session/tests/session_start_variation1.phpt b/ext/session/tests/session_start_variation1.phpt
index d76bd8b0f3..e7eba3d28b 100644
--- a/ext/session/tests/session_start_variation1.phpt
+++ b/ext/session/tests/session_start_variation1.phpt
@@ -7,10 +7,10 @@ Test session_start() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_start(void)
* Description : Initialize session data
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_start() : variation ***\n";
diff --git a/ext/session/tests/session_start_variation2.phpt b/ext/session/tests/session_start_variation2.phpt
index 5ef9bbf79f..1cc6454d5e 100644
--- a/ext/session/tests/session_start_variation2.phpt
+++ b/ext/session/tests/session_start_variation2.phpt
@@ -7,10 +7,10 @@ Test session_start() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_start(void)
* Description : Initialize session data
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_start() : variation ***\n";
@@ -29,7 +29,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_start() : variation ***
bool(true)
bool(true)
diff --git a/ext/session/tests/session_start_variation3.phpt b/ext/session/tests/session_start_variation3.phpt
index 8f0b56306f..9ff1ff0139 100644
--- a/ext/session/tests/session_start_variation3.phpt
+++ b/ext/session/tests/session_start_variation3.phpt
@@ -7,10 +7,10 @@ Test session_start() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_start(void)
* Description : Initialize session data
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_start() : variation ***\n";
diff --git a/ext/session/tests/session_start_variation4.phpt b/ext/session/tests/session_start_variation4.phpt
index 328ce6fceb..76f21f4bca 100644
--- a/ext/session/tests/session_start_variation4.phpt
+++ b/ext/session/tests/session_start_variation4.phpt
@@ -7,10 +7,10 @@ Test session_start() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_start(void)
* Description : Initialize session data
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_start() : variation ***\n";
@@ -25,7 +25,7 @@ echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_start() : variation ***
array(1) {
["blah"]=>
diff --git a/ext/session/tests/session_start_variation5.phpt b/ext/session/tests/session_start_variation5.phpt
index a1b461f69f..edcadbf7bb 100644
--- a/ext/session/tests/session_start_variation5.phpt
+++ b/ext/session/tests/session_start_variation5.phpt
@@ -7,10 +7,10 @@ Test session_start() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_start(void)
* Description : Initialize session data
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_start() : variation ***\n";
@@ -31,7 +31,7 @@ session_destroy();
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_start() : variation ***
array(4) {
["colour"]=>
diff --git a/ext/session/tests/session_start_variation6.phpt b/ext/session/tests/session_start_variation6.phpt
index e0f1eb782a..639527a63f 100644
--- a/ext/session/tests/session_start_variation6.phpt
+++ b/ext/session/tests/session_start_variation6.phpt
@@ -7,10 +7,10 @@ Test session_start() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_start(void)
* Description : Initialize session data
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_start() : variation ***\n";
@@ -32,7 +32,7 @@ session_destroy();
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_start() : variation ***
array(4) {
["colour"]=>
diff --git a/ext/session/tests/session_start_variation7.phpt b/ext/session/tests/session_start_variation7.phpt
index b159ee8981..33101b5147 100644
--- a/ext/session/tests/session_start_variation7.phpt
+++ b/ext/session/tests/session_start_variation7.phpt
@@ -7,10 +7,10 @@ Test session_start() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_start(void)
* Description : Initialize session data
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_start() : variation ***\n";
@@ -32,7 +32,7 @@ session_destroy();
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_start() : variation ***
array(4) {
["colour"]=>
diff --git a/ext/session/tests/session_start_variation8.phpt b/ext/session/tests/session_start_variation8.phpt
index f37e1bf15f..9365475275 100644
--- a/ext/session/tests/session_start_variation8.phpt
+++ b/ext/session/tests/session_start_variation8.phpt
@@ -7,10 +7,10 @@ Test session_start() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_start(void)
* Description : Initialize session data
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_start() : variation ***\n";
diff --git a/ext/session/tests/session_start_variation9.phpt b/ext/session/tests/session_start_variation9.phpt
index e37c484ee0..2629b074b6 100644
--- a/ext/session/tests/session_start_variation9.phpt
+++ b/ext/session/tests/session_start_variation9.phpt
@@ -9,10 +9,10 @@ session.auto_start=1
ob_start();
-/*
+/*
* Prototype : bool session_start(void)
* Description : Initialize session data
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_start() : variation ***\n";
diff --git a/ext/session/tests/session_status.phpt b/ext/session/tests/session_status.phpt
index d1f7e2f386..f58514aa10 100644
--- a/ext/session/tests/session_status.phpt
+++ b/ext/session/tests/session_status.phpt
@@ -17,7 +17,7 @@ session_start();
var_dump(session_status() == PHP_SESSION_ACTIVE);
?>
---EXPECTF--
+--EXPECT--
*** Testing session_status() : active, none
bool(true)
bool(true)
diff --git a/ext/session/tests/session_status_disabled.phpt b/ext/session/tests/session_status_disabled.phpt
index c4d1f2192d..9a16a2fc0e 100644
--- a/ext/session/tests/session_status_disabled.phpt
+++ b/ext/session/tests/session_status_disabled.phpt
@@ -12,6 +12,6 @@ echo "*** Testing session_status() : disabled\n";
var_dump(session_status() == PHP_SESSION_DISABLED);
?>
---EXPECTF--
+--EXPECT--
*** Testing session_status() : disabled
bool(true)
diff --git a/ext/session/tests/session_unset_basic.phpt b/ext/session/tests/session_unset_basic.phpt
index fd79c93c9c..7a19a5e93d 100644
--- a/ext/session/tests/session_unset_basic.phpt
+++ b/ext/session/tests/session_unset_basic.phpt
@@ -7,10 +7,10 @@ Test session_unset() function : basic functionality
ob_start();
-/*
+/*
* Prototype : void session_unset(void)
* Description : Free all session variables
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_unset() : basic functionality ***\n";
@@ -26,7 +26,7 @@ var_dump($_SESSION);
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_unset() : basic functionality ***
bool(true)
array(1) {
diff --git a/ext/session/tests/session_unset_error.phpt b/ext/session/tests/session_unset_error.phpt
index c411cffa46..e371bcb409 100644
--- a/ext/session/tests/session_unset_error.phpt
+++ b/ext/session/tests/session_unset_error.phpt
@@ -7,10 +7,10 @@ Test session_unset() function : error functionality
ob_start();
-/*
+/*
* Prototype : void session_unset(void)
* Description : Free all session variables
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_unset() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_unset_variation1.phpt b/ext/session/tests/session_unset_variation1.phpt
index 8235ef44fd..c01128031d 100644
--- a/ext/session/tests/session_unset_variation1.phpt
+++ b/ext/session/tests/session_unset_variation1.phpt
@@ -7,10 +7,10 @@ Test session_unset() function : variation
ob_start();
-/*
+/*
* Prototype : void session_unset(void)
* Description : Free all session variables
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_unset() : variation ***\n";
@@ -28,7 +28,7 @@ var_dump(session_unset());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_unset() : variation ***
bool(false)
bool(true)
diff --git a/ext/session/tests/session_write_close_basic.phpt b/ext/session/tests/session_write_close_basic.phpt
index f3695324dd..481f4876ea 100644
--- a/ext/session/tests/session_write_close_basic.phpt
+++ b/ext/session/tests/session_write_close_basic.phpt
@@ -7,10 +7,10 @@ Test session_write_close() function : basic functionality
ob_start();
-/*
+/*
* Prototype : bool session_write_close(void)
* Description : Write session data and end session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_write_close() : basic functionality ***\n";
@@ -27,7 +27,7 @@ var_dump($_SESSION);
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_write_close() : basic functionality ***
bool(true)
array(0) {
diff --git a/ext/session/tests/session_write_close_error.phpt b/ext/session/tests/session_write_close_error.phpt
index 5e48d8c000..102ac41382 100644
--- a/ext/session/tests/session_write_close_error.phpt
+++ b/ext/session/tests/session_write_close_error.phpt
@@ -7,10 +7,10 @@ Test session_write_close() function : error functionality
ob_start();
-/*
+/*
* Prototype : bool session_write_close(void)
* Description : Write session data and end session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_write_close() : error functionality ***\n";
@@ -57,7 +57,7 @@ $inputs = array(
false,
TRUE,
FALSE,
-
+
// Empty strings
/*16*/ "",
'',
@@ -66,7 +66,7 @@ $inputs = array(
/*18*/ "Nothing",
'Nothing',
$heredoc,
-
+
// Object data
/*21*/ new classA(),
diff --git a/ext/session/tests/session_write_close_variation1.phpt b/ext/session/tests/session_write_close_variation1.phpt
index 8242a1a448..e5a87370c3 100644
--- a/ext/session/tests/session_write_close_variation1.phpt
+++ b/ext/session/tests/session_write_close_variation1.phpt
@@ -7,10 +7,10 @@ Test session_write_close() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_write_close(void)
* Description : Write session data and end session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_write_close() : variation ***\n";
@@ -27,7 +27,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_write_close() : variation ***
bool(true)
bool(true)
diff --git a/ext/session/tests/session_write_close_variation2.phpt b/ext/session/tests/session_write_close_variation2.phpt
index 8cca89b773..eb3bfc104b 100644
--- a/ext/session/tests/session_write_close_variation2.phpt
+++ b/ext/session/tests/session_write_close_variation2.phpt
@@ -7,10 +7,10 @@ Test session_write_close() function : variation
ob_start();
-/*
+/*
* Prototype : bool session_write_close(void)
* Description : Write session data and end session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_write_close() : variation ***\n";
@@ -33,7 +33,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_write_close() : variation ***
bool(true)
array(0) {
diff --git a/ext/session/tests/session_write_close_variation3.phpt b/ext/session/tests/session_write_close_variation3.phpt
index 1a3afb7387..a8f5457f24 100644
--- a/ext/session/tests/session_write_close_variation3.phpt
+++ b/ext/session/tests/session_write_close_variation3.phpt
@@ -9,10 +9,10 @@ session.auto_start=1
ob_start();
-/*
+/*
* Prototype : bool session_write_close(void)
* Description : Write session data and end session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_write_close() : variation ***\n";
@@ -26,7 +26,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_write_close() : variation ***
array(0) {
}
diff --git a/ext/session/tests/session_write_close_variation4.phpt b/ext/session/tests/session_write_close_variation4.phpt
index abfd3d53bf..a6d78cf134 100644
--- a/ext/session/tests/session_write_close_variation4.phpt
+++ b/ext/session/tests/session_write_close_variation4.phpt
@@ -9,10 +9,10 @@ session.use_strict_mode=0
ob_start();
-/*
+/*
* Prototype : bool session_write_close(void)
* Description : Write session data and end session
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_write_close() : variation ***\n";
@@ -36,7 +36,7 @@ var_dump(session_destroy());
echo "Done";
ob_end_flush();
?>
---EXPECTF--
+--EXPECT--
*** Testing session_write_close() : variation ***
string(0) ""
bool(true)
diff --git a/ext/session/tests/sessionhandler_open_001.phpt b/ext/session/tests/sessionhandler_open_001.phpt
index 2b8c3a49fb..e6e913a6a5 100644
--- a/ext/session/tests/sessionhandler_open_001.phpt
+++ b/ext/session/tests/sessionhandler_open_001.phpt
@@ -3,7 +3,7 @@ Testing repated SessionHandler::open() calls
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
-<?php
+<?php
ini_set('session.save_handler', 'files');
$x = new SessionHandler;