summaryrefslogtreecommitdiff
path: root/ext/standard/php_string.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/php_string.h')
-rw-r--r--ext/standard/php_string.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h
index 65219f257a..1ce98ee07a 100644
--- a/ext/standard/php_string.h
+++ b/ext/standard/php_string.h
@@ -156,7 +156,7 @@ PHPAPI char *php_strerror(int errnum);
# define php_mblen(ptr, len) 1
#else
# if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T)
-# define php_mblen(ptr, len) ((ptr) == NULL ? mbsinit(&BG(mblen_state)): (int)mbrlen(ptr, len, &BG(mblen_state)))
+# define php_mblen(ptr, len) ((ptr) == NULL ? memset(&BG(mblen_state), 0, sizeof(BG(mblen_state))): (int)mbrlen(ptr, len, &BG(mblen_state)))
# else
# define php_mblen(ptr, len) mblen(ptr, len)
# endif