summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-09-17 21:46:48 +0200
committerAnatol Belski <ab@php.net>2014-09-17 21:46:48 +0200
commit341ff0dea5065176fbcb53505c2a5c845a252c8c (patch)
tree01e571401fc000b50052ede1a4411edc4cf13e5d
parentb5406ed3167512f156e74c1bbd422d26ade271fa (diff)
downloadphp-git-341ff0dea5065176fbcb53505c2a5c845a252c8c.tar.gz
fix macro usage
-rw-r--r--sapi/apache2handler/sapi_apache2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index ad5e4db1cf..aed77413ea 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -482,7 +482,11 @@ static int php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC)
r->no_local_copy = 1;
content_length = (char *) apr_table_get(r->headers_in, "Content-Length");
- SG(request_info).content_length = (content_length ? ZEND_ATOL(content_length) : 0);
+ if (content_length) {
+ ZEND_ATOL(SG(request_info).content_length, content_length);
+ } else {
+ SG(request_info).content_length = 0;
+ }
apr_table_unset(r->headers_out, "Content-Length");
apr_table_unset(r->headers_out, "Last-Modified");