}
PS(mod_data) = NULL;
- RETVAL_STRING(safe_estrdup(PS(mod)->s_name), 0);
-
+ if (PS(mod) && PS(mod)->s_name) {
+ RETVAL_STRING(safe_estrdup(PS(mod)->s_name), 0);
+ }
+ else {
+ RETVAL_EMPTY_STRING();
+ }
+
zend_alter_ini_entry("session.save_handler", sizeof("session.save_handler"), Z_STRVAL_PP(p_name), Z_STRLEN_PP(p_name), PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
} else {
- RETURN_STRING(safe_estrdup(PS(mod)->s_name), 0);
+ if (PS(mod) && PS(mod)->s_name) {
+ RETURN_STRING(safe_estrdup(PS(mod)->s_name), 0);
+ }
+ else {
+ RETURN_EMPTY_STRING();
+ }
}
}
/* }}} */