diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 1e275f1cf8c..f79d17e700b 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -169,8 +169,6 @@ PHPAPI void php_session_set_id(char *id TSRMLS_DC); #define PS_DEL_VARL(name,namelen) \ zend_hash_del(&PS(vars), name, namelen + 1); -#define PS_DEL_VAR(name) PS_DEL_VARL(name, strlen(name)) - #define PS_ENCODE_VARS \ char *key; \ uint key_length; \ diff --git a/ext/session/session.c b/ext/session/session.c index 73acb37c0df..30c31a45d42 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1276,7 +1276,7 @@ PHP_FUNCTION(session_unregister) convert_to_string_ex(p_name); - PS_DEL_VAR(Z_STRVAL_PP(p_name)); + PS_DEL_VARL(Z_STRVAL_PP(p_name), Z_STRLEN_PP(p_name)); RETURN_TRUE; }