Skip to content

Commit da2f581

Browse files
committed
Fix thread safety
1 parent 418f974 commit da2f581

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ PHPAPI int core_globals_id;
127127
#define SAFE_FILENAME(f) ((f)?(f):"-")
128128

129129
static char *get_safe_charset_hint(void) {
130-
static char *lastHint = NULL;
131-
static char *lastCodeset = NULL;
130+
ZEND_TLS char *lastHint = NULL;
131+
ZEND_TLS char *lastCodeset = NULL;
132132
char *hint = SG(default_charset);
133133
size_t len = strlen(hint);
134134
size_t i = 0;

0 commit comments

Comments
 (0)