]> granicus.if.org Git - php/commitdiff
fix #38278 (session_cache_expire()'s value does not match phpinfo's session.cache_expire)
authorAntony Dovgal <tony2001@php.net>
Tue, 1 Aug 2006 08:31:37 +0000 (08:31 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 1 Aug 2006 08:31:37 +0000 (08:31 +0000)
ext/session/session.c

index 39b247ed8e9d2d400f4db3434f70eb6edd4bc809..b5d0225e633a0484451f2c62c1dee6ae5b30278d 100644 (file)
@@ -1442,8 +1442,8 @@ PHP_FUNCTION(session_cache_expire)
                WRONG_PARAM_COUNT;
 
        if (ac == 1) {
-               convert_to_long_ex(p_cache_expire);
-               PS(cache_expire) = Z_LVAL_PP(p_cache_expire);
+               convert_to_string_ex(p_cache_expire);
+               zend_alter_ini_entry("session.cache_expire", sizeof("session.cache_expire"), Z_STRVAL_PP(p_cache_expire), Z_STRLEN_PP(p_cache_expire), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
        }
 
        RETVAL_LONG(old);