diff options
| -rw-r--r-- | ext/standard/php_smart_str.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/standard/php_smart_str.h b/ext/standard/php_smart_str.h index e11eb734ed..283d3eb8b7 100644 --- a/ext/standard/php_smart_str.h +++ b/ext/standard/php_smart_str.h @@ -31,6 +31,8 @@ #define smart_str_0(x) do { \ if ((x)->s) { \ (x)->s->val[(x)->s->len] = '\0'; \ + } else { \ + smart_str_appendc((x), '\0'); \ } \ } while (0) |
