diff options
author | Anatol Belski <ab@php.net> | 2014-07-21 11:35:22 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-07-21 11:35:22 +0200 |
commit | 457f1a3ad57cad31d410ef0e08e25c7ab0f4e9a8 (patch) | |
tree | ca2dd3f62d04af8097b45630b0801b35144f6b98 /ext/session/mod_user.c | |
parent | 6ac9e106af2f7c84142cc22a0a910686420546a7 (diff) | |
parent | 833e4669832137edbc4526a0d7c10f16396554a0 (diff) | |
download | php-git-457f1a3ad57cad31d410ef0e08e25c7ab0f4e9a8.tar.gz |
Merge remote-tracking branch 'origin/master' into str_size_and_int64
* origin/master:
This test depends on expose_php being on
fixed broken merged code
Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index.
Test output relies on expose_php being on
1.2 is a problematic float to print out Lower the default display precision for this test
The test output is dependent on expose_php ini
cleanup file headers.
Do not kill children process in pre-fork mode when parent process quit.
update year & copyright
Fix bug #67587: Redirection loop on nginx with FPM
Fix still broken session test. Only return true/false.
Followup fix to custom session save handlers
Fix handling of session user module custom handlers.
Update info.c
Conflicts:
ext/session/mod_user.c
main/php_content_types.c
Diffstat (limited to 'ext/session/mod_user.c')
-rw-r--r-- | ext/session/mod_user.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index f984a2d6ca..73d0c45364 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -68,12 +68,25 @@ static zval *ps_call_handler(zval *func, int argc, zval **argv TSRMLS_DC) #define PSF(a) PS(mod_user_names).name.ps_##a -#define FINISH \ - if (retval) { \ - convert_to_int(retval); \ - ret = Z_IVAL_P(retval); \ - zval_ptr_dtor(&retval); \ - } \ +#define FINISH \ + if (retval) { \ + if (Z_TYPE_P(retval) == IS_BOOL) { \ + ret = Z_BVAL_P(retval) ? SUCCESS : FAILURE; \ + } else if ((Z_TYPE_P(retval) == IS_INT) && (Z_IVAL_P(retval) == -1)) { \ + /* BC for clever users - Deprecate me */ \ + ret = FAILURE; \ + } else if ((Z_TYPE_P(retval) == IS_INT) && (Z_IVAL_P(retval) == 0)) { \ + /* BC for clever users - Deprecate me */ \ + ret = SUCCESS; \ + } else { \ + if (!EG(exception)) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, \ + "Session callback expects true/false return value"); \ + } \ + ret = FAILURE; \ + } \ + zval_ptr_dtor(&retval); \ + } \ return ret PS_OPEN_FUNC(user) |