com php-src: fix setcookie Max-Age to use php_time: ext/s tandard/head.c
| From: | Joe Watkins | Date: | Wed, 19 Jun 2019 10:42:00 +0000 |
| Subject: | com php-src: fix setcookie Max-Age to use php_time: ext/s tandard/head.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106884@lists.php.net to get a copy of this message | ||
Commit: 31a1c1e67c93de186d8faf368784a8745b23f5b1
Author: Joe Watkins <krakjoe@php.net> Wed, 19 Jun 2019 12:42:00 +0200
Parents: 599b94ff14e9de2acd871b7db17e70e6c84dbe2b
Branches: PHP-7.2 PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=31a1c1e67c93de186d8faf368784a8745b23f5b1
Log:
fix setcookie Max-Age to use php_time
Changed paths:
M ext/standard/head.c
Diff:
diff --git a/ext/standard/head.c b/ext/standard/head.c
index e3a35c9..f57b8b0 100644
--- a/ext/standard/head.c
+++ b/ext/standard/head.c
@@ -154,7 +154,7 @@ PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires,
strlcat(cookie, ZSTR_VAL(dt), len + 100);
zend_string_free(dt);
- diff = difftime(expires, time(NULL));
+ diff = difftime(expires, php_time());
if (diff < 0) {
diff = 0;
}