cvs: php4 /ext/session session.c

From: Date: Sun, 02 Jul 2000 16:27:39 +0000
Subject: cvs: php4 /ext/session session.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-588@lists.php.net to get a copy of this message
stas Sun Jul 2 09:27:39 2000 EDT Modified files: /php4/ext/session session.c Log: Fix couple of crashes on error conditions Make session_module_name really work Index: php4/ext/session/session.c diff -u php4/ext/session/session.c:1.150 php4/ext/session/session.c:1.151 --- php4/ext/session/session.c:1.150 Thu Jun 29 06:09:27 2000 +++ php4/ext/session/session.c Sun Jul 2 09:27:39 2000 @@ -75,6 +75,9 @@ PSLS_FETCH(); PS(mod) = _php_find_ps_module(new_value PSLS_CC); + if(!PS(mod)) { + php_error(E_ERROR,"Can't find save handler %s",new_value); + } return SUCCESS; } @@ -84,6 +87,9 @@ PSLS_FETCH(); PS(serializer) = _php_find_ps_serializer(new_value PSLS_CC); + if(!PS(serializer)) { + php_error(E_ERROR,"Can't find serializer handler %s",new_value); + } return SUCCESS; } @@ -481,6 +487,10 @@ ulong num_key; PLS_FETCH(); + if(!PS(http_session_vars)) { + return; + } + if (!PG(register_globals)) { for (zend_hash_internal_pointer_reset(PS(http_session_vars)->value.ht); zend_hash_get_current_key(PS(http_session_vars)->value.ht, &variable, &num_key) == HASH_KEY_IS_STRING; @@ -979,7 +989,8 @@ if (tempmod) { if (PS(mod_data)) PS(mod)->close(&PS(mod_data)); - PS(mod_data) = tempmod; + PS(mod) = tempmod; + PS(mod_data) = NULL; } else { efree(old); php_error(E_ERROR, "Cannot find named PHP session module (%s)",

« previous php.cvs (#588) next »