diff options
| author | Yasuo Ohgaki <yohgaki@php.net> | 2016-08-29 05:57:37 +0900 |
|---|---|---|
| committer | Yasuo Ohgaki <yohgaki@php.net> | 2016-08-29 05:57:37 +0900 |
| commit | 1cf179e4150308d8217d9517408ca5e22b5d607f (patch) | |
| tree | 9176fa1156823cb17cdeef5f12ee12d01197a0d2 /ext/session/mod_user_class.c | |
| parent | be0958d291e30dc025f6c519266beeddfc72ea0c (diff) | |
| download | php-git-1cf179e4150308d8217d9517408ca5e22b5d607f.tar.gz | |
Implement RFC Add session_gc() https://wiki.php.net/rfc/session-gc
Diffstat (limited to 'ext/session/mod_user_class.c')
| -rw-r--r-- | ext/session/mod_user_class.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/session/mod_user_class.c b/ext/session/mod_user_class.c index a774d4bf9c..b132552faf 100644 --- a/ext/session/mod_user_class.c +++ b/ext/session/mod_user_class.c @@ -148,7 +148,7 @@ PHP_METHOD(SessionHandler, destroy) PHP_METHOD(SessionHandler, gc) { zend_long maxlifetime; - int nrdels; + zend_long nrdels = -1; PS_SANITY_CHECK_IS_OPEN; @@ -156,7 +156,10 @@ PHP_METHOD(SessionHandler, gc) return; } - RETURN_BOOL(SUCCESS == PS(default_mod)->s_gc(&PS(mod_data), maxlifetime, &nrdels)); + if (PS(default_mod)->s_gc(&PS(mod_data), maxlifetime, &nrdels) == FAILURE) { + RETURN_FALSE; + } + RETURN_LONG(nrdels); } /* }}} */ |
