p = new_value;
}
- if (PG(safe_mode) && (!php_checkuid(p, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
+ if (PG(safe_mode) && *p && (!php_checkuid(p, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
return FAILURE;
}
- if (PG(open_basedir) && php_check_open_basedir(p TSRMLS_CC)) {
+ if (PG(open_basedir) && *p && php_check_open_basedir(p TSRMLS_CC)) {
return FAILURE;
}
}
}
IF_SESSION_VARS() {
- HashTable *ht = Z_ARRVAL_P(PS(http_session_vars));
+ HashTable *ht;
+
+ SEPARATE_ZVAL_IF_NOT_REF(&PS(http_session_vars));
+ ht = Z_ARRVAL_P(PS(http_session_vars));
if (PG(register_globals)) {
uint str_len;
return;
}
- PS_DEL_VARL(p_name, p_name_len);
+ IF_SESSION_VARS() {
+ SEPARATE_ZVAL_IF_NOT_REF(&PS(http_session_vars));
+ PS_DEL_VARL(Z_STRVAL_PP(p_name), Z_STRLEN_PP(p_name));
+ }
RETURN_TRUE;
}