diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 31cb41adfdf..3d203eb2275 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -1694,7 +1694,7 @@ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gmt) /* VS2012 strftime() returns number of characters, not bytes. See VC++11 bug id 766205. */ if (real_len > 0) { - real_len = strlen(buf); + real_len = buf->len; } #endif