From: Sascha Schumann Date: Mon, 23 Sep 2002 14:04:50 +0000 (+0000) Subject: (php_get_session_var) Always return FAILURE if no data source was found. X-Git-Tag: MODERN_SYMMETRIC_SESSION_BEHAVIOUR_20021003~235 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff12826fc15a3a44440c47647b10b65718f8ea93;p=php (php_get_session_var) Always return FAILURE if no data source was found. Noticed by: Sebastian Bergmann --- diff --git a/ext/session/session.c b/ext/session/session.c index 0b54c46029..453803603e 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -287,10 +287,10 @@ int php_get_session_var(char *name, size_t namelen, zval ***state_var TSRMLS_DC) if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), name, namelen+1, (void **) state_var)==SUCCESS) { return SUCCESS; } - } else if (!PG(register_globals)) { - /* register_globals is disabled, but we don't have http_session_vars */ - return FAILURE; - } + } + + /* register_globals is disabled, but we don't have http_session_vars */ + return FAILURE; } #define PS_BIN_NR_OF_BITS 8