(PHP session_unset) Return early, if no session was started.

PR: #8354
This commit is contained in:
Sascha Schumann 2000-12-22 22:53:14 +00:00
parent 0b194cbca6
commit 92f61634eb

View File

@ -1388,6 +1388,9 @@ PHP_FUNCTION(session_unset)
ulong num_key;
PSLS_FETCH();
if (PS(nr_open_sessions) == 0)
RETURN_FALSE;
for (zend_hash_internal_pointer_reset(&PS(vars));
zend_hash_get_current_key(&PS(vars), &variable, &num_key, 0) == HASH_KEY_IS_STRING;
zend_hash_move_forward(&PS(vars))) {