From: Sascha Schumann Date: Tue, 22 Feb 2000 22:52:14 +0000 (+0000) Subject: Revert part of the last commit X-Git-Tag: PHP-4.0-RC1~486 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67f6945e8a3d2020ed443052a5384c4069d8704f;p=php Revert part of the last commit --- 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) {