]> granicus.if.org Git - php/commitdiff
Revert part of the last commit
authorSascha Schumann <sas@php.net>
Tue, 22 Feb 2000 22:52:14 +0000 (22:52 +0000)
committerSascha Schumann <sas@php.net>
Tue, 22 Feb 2000 22:52:14 +0000 (22:52 +0000)
ext/session/session.c

index 4e21914a9d0957d8c880ea98a58b638a25a04f27..3e80eaee6c5b87c6aa5a4891a375d424de96d16c 100644 (file)
@@ -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) {