From 67f6945e8a3d2020ed443052a5384c4069d8704f Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Tue, 22 Feb 2000 22:52:14 +0000 Subject: [PATCH] Revert part of the last commit --- ext/session/session.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/session/session.c b/ext/session/session.c index 4e21914a9d..3e80eaee6c 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -846,7 +846,7 @@ PHP_FUNCTION(session_name) old = estrdup(PS(session_name)); - if (ac != 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE) + if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE) WRONG_PARAM_COUNT; if (ac == 1) { @@ -870,7 +870,7 @@ PHP_FUNCTION(session_module_name) old = estrdup(PS(mod)->name); - if (ac != 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE) + if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE) WRONG_PARAM_COUNT; if (ac == 1) { @@ -935,7 +935,7 @@ PHP_FUNCTION(session_save_path) old = estrdup(PS(save_path)); - if (ac != 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE) + if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE) WRONG_PARAM_COUNT; if (ac == 1) { @@ -960,7 +960,7 @@ PHP_FUNCTION(session_id) if (PS(id)) old = estrdup(PS(id)); - if (ac != 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE) + if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE) WRONG_PARAM_COUNT; if (ac == 1) { -- 2.50.1