diff options
author | krakjoe <joe.watkins@live.co.uk> | 2014-11-25 08:37:02 +0000 |
---|---|---|
committer | krakjoe <joe.watkins@live.co.uk> | 2014-11-25 08:37:02 +0000 |
commit | e07feeaf8b91f16a89e9903b461042a0f6a63ac0 (patch) | |
tree | 4a94cd382fcffefff920f7733562e1860a66cc44 /sapi/apache2handler/php_functions.c | |
parent | 9b6836ebd36eccc9e81ca51e2efe172e1d334f0b (diff) | |
parent | d4f42289ddde002cb4d3ed9d1a4f2219f68df48e (diff) | |
download | php-git-e07feeaf8b91f16a89e9903b461042a0f6a63ac0.tar.gz |
Merge branch 'master' of https://github.com/php/php-src
Diffstat (limited to 'sapi/apache2handler/php_functions.c')
-rw-r--r-- | sapi/apache2handler/php_functions.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c index d9ae4d97ea..f32c881e05 100644 --- a/sapi/apache2handler/php_functions.c +++ b/sapi/apache2handler/php_functions.c @@ -388,8 +388,12 @@ PHP_MINFO_FUNCTION(apache) } smart_str_appendc(&tmp1, ' '); } - if (tmp1.s && (tmp1.s->len - 1) >= 0) { - tmp1.s->val[tmp1.s->len - 1] = '\0'; + if (tmp1.s) { + if (tmp1.s->len > 0) { + tmp1.s->val[tmp1.s->len - 1] = '\0'; + } else { + tmp1.s->val[0] = '\0'; + } } php_info_print_table_start(); |