summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/session/session.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/session/session.c b/ext/session/session.c
index 09e48c2c6a..e94ab967aa 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -1046,10 +1046,10 @@ PHP_FUNCTION(session_name)
int ac = ZEND_NUM_ARGS();
char *old;
- old = estrdup(PS(session_name));
-
if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE)
WRONG_PARAM_COUNT;
+
+ old = estrdup(PS(session_name));
if (ac == 1) {
convert_to_string_ex(p_name);
@@ -1068,10 +1068,10 @@ PHP_FUNCTION(session_module_name)
int ac = ZEND_NUM_ARGS();
char *old;
- old = safe_estrdup(PS(mod)->name);
-
if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE)
WRONG_PARAM_COUNT;
+
+ old = safe_estrdup(PS(mod)->name);
if (ac == 1) {
ps_module *tempmod;
@@ -1132,10 +1132,10 @@ PHP_FUNCTION(session_save_path)
int ac = ZEND_NUM_ARGS();
char *old;
- old = estrdup(PS(save_path));
-
if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE)
WRONG_PARAM_COUNT;
+
+ old = estrdup(PS(save_path));
if (ac == 1) {
convert_to_string_ex(p_name);
@@ -1154,12 +1154,12 @@ PHP_FUNCTION(session_id)
int ac = ZEND_NUM_ARGS();
char *old = empty_string;
- if (PS(id))
- old = estrdup(PS(id));
-
if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE)
WRONG_PARAM_COUNT;
+ if (PS(id))
+ old = estrdup(PS(id));
+
if (ac == 1) {
convert_to_string_ex(p_name);
if (PS(id)) efree(PS(id));
@@ -1178,10 +1178,10 @@ PHP_FUNCTION(session_cache_limiter)
int ac = ZEND_NUM_ARGS();
char *old;
- old = estrdup(PS(cache_limiter));
-
if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_cache_limiter) == FAILURE)
WRONG_PARAM_COUNT;
+
+ old = estrdup(PS(cache_limiter));
if (ac == 1) {
convert_to_string_ex(p_cache_limiter);