Skip to content

Commit a5db319

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: fix setcookie Max-Age to use php_time
2 parents 2645368 + 31a1c1e commit a5db319

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/head.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires,
153153
smart_str_append(&buf, dt);
154154
zend_string_free(dt);
155155

156-
diff = difftime(expires, time(NULL));
156+
diff = difftime(expires, php_time());
157157
if (diff < 0) {
158158
diff = 0;
159159
}

0 commit comments

Comments
 (0)