com php-src: Merge branch 'PHP-7.2' into PHP-7.3: ext/standard/head.c
| From: | Joe Watkins | Date: | Wed, 19 Jun 2019 10:42:25 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.2' into PHP-7.3: ext/standard/head.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106883@lists.php.net to get a copy of this message | ||
Commit: a5db31946361af4655c9ed4622f2c87c062009f0
Author: Joe Watkins <krakjoe@php.net> Wed, 19 Jun 2019 12:42:25 +0200
Parents: 264536877dd63a8cee0175e636fdec8046e305c0 31a1c1e67c93de186d8faf368784a8745b23f5b1
Branches: PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a5db31946361af4655c9ed4622f2c87c062009f0
Log:
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
fix setcookie Max-Age to use php_time
Changed paths:
MM ext/standard/head.c
Diff:
diff --cc ext/standard/head.c
index 0043099,f57b8b0..6897cc7
--- a/ext/standard/head.c
+++ b/ext/standard/head.c
@@@ -149,11 -151,10 +149,11 @@@ PHPAPI int php_setcookie(zend_string *n
zend_error(E_WARNING, "Expiry date cannot have a year greater than 9999");
return FAILURE;
}
- strlcat(cookie, ZSTR_VAL(dt), len + 100);
+
+ smart_str_append(&buf, dt);
zend_string_free(dt);
- diff = difftime(expires, time(NULL));
+ diff = difftime(expires, php_time());
if (diff < 0) {
diff = 0;
}