From: Joe Watkins Date: Wed, 19 Jun 2019 10:42:25 +0000 (+0200) Subject: Merge branch 'PHP-7.2' into PHP-7.3 X-Git-Tag: php-7.4.0alpha2~53^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5db31946361af4655c9ed4622f2c87c062009f0;p=php Merge branch 'PHP-7.2' into PHP-7.3 * PHP-7.2: fix setcookie Max-Age to use php_time --- a5db31946361af4655c9ed4622f2c87c062009f0 diff --cc ext/standard/head.c index 0043099b40,f57b8b02ed..6897cc7cf8 --- 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; }