summaryrefslogtreecommitdiff
path: root/ext/session/session.c
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-06-22 22:38:01 +0200
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-06-23 15:42:59 +0200
commitb981662855d06cce77e78d35ccbb6656b10bea22 (patch)
treeabf3ea15e9cb73f4fc6dc9c80c2d29a99ff23fed /ext/session/session.c
parent35729b76043884b669d9c1918f7d4494bf80c806 (diff)
downloadphp-git-b981662855d06cce77e78d35ccbb6656b10bea22.tar.gz
Fix a couple of UNKNOWN default values in ext/session
Closes GH-5752
Diffstat (limited to 'ext/session/session.c')
-rw-r--r--ext/session/session.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/ext/session/session.c b/ext/session/session.c
index 483bf4dd0f..0b190f0496 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -1849,7 +1849,7 @@ PHP_FUNCTION(session_name)
zend_string *name = NULL;
zend_string *ini_name;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S", &name) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S!", &name) == FAILURE) {
RETURN_THROWS();
}
@@ -1880,7 +1880,7 @@ PHP_FUNCTION(session_module_name)
zend_string *name = NULL;
zend_string *ini_name;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S", &name) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S!", &name) == FAILURE) {
RETURN_THROWS();
}
@@ -2103,7 +2103,7 @@ PHP_FUNCTION(session_save_path)
zend_string *name = NULL;
zend_string *ini_name;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S", &name) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|P!", &name) == FAILURE) {
RETURN_THROWS();
}
@@ -2120,11 +2120,6 @@ PHP_FUNCTION(session_save_path)
RETVAL_STRING(PS(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_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_ex(ini_name, 0);
@@ -2139,7 +2134,7 @@ PHP_FUNCTION(session_id)
zend_string *name = NULL;
int argc = ZEND_NUM_ARGS();
- if (zend_parse_parameters(argc, "|S", &name) == FAILURE) {
+ if (zend_parse_parameters(argc, "|S!", &name) == FAILURE) {
RETURN_THROWS();
}
@@ -2337,7 +2332,7 @@ PHP_FUNCTION(session_cache_limiter)
zend_string *limiter = NULL;
zend_string *ini_name;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S", &limiter) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S!", &limiter) == FAILURE) {
RETURN_THROWS();
}