diff options
| author | Xinchen Hui <laruence@gmail.com> | 2014-03-24 14:06:35 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@gmail.com> | 2014-03-24 14:06:35 +0800 |
| commit | 9e96c912fc7f6b5fec72521fe4a560fcab0478b9 (patch) | |
| tree | 36eddad0172bbbdcb19bfab2b82386378ebedce4 /ext/standard/php_smart_str.h | |
| parent | 50dc2ec46cc59fef176f2e0d37450c84f3b70e64 (diff) | |
| download | php-git-9e96c912fc7f6b5fec72521fe4a560fcab0478b9.tar.gz | |
Fixed smart_str0 for empty str(more friendly for user?)
Diffstat (limited to 'ext/standard/php_smart_str.h')
| -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) |
