mirror of
https://github.com/php/php-src.git
synced 2026-04-29 19:23:22 +02:00
MFH Fix bug #35975 - Session cookie expires date format isn't the most compatible. Sync to that of setcookie().
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
#include "ext/standard/md5.h"
|
||||
#include "ext/standard/sha1.h"
|
||||
#include "ext/standard/php_var.h"
|
||||
#include "ext/standard/datetime.h"
|
||||
#include "ext/date/php_date.h"
|
||||
#include "ext/standard/php_lcg.h"
|
||||
#include "ext/standard/url_scanner_ex.h"
|
||||
#include "ext/standard/php_rand.h" /* for RAND_MAX */
|
||||
@@ -1116,7 +1116,7 @@ static void php_session_send_cookie(TSRMLS_D)
|
||||
t = tv.tv_sec + PS(cookie_lifetime);
|
||||
|
||||
if (t > 0) {
|
||||
date_fmt = php_std_date(t TSRMLS_CC);
|
||||
date_fmt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, t, 0 TSRMLS_CC);
|
||||
smart_str_appends(&ncookie, COOKIE_EXPIRES);
|
||||
smart_str_appends(&ncookie, date_fmt);
|
||||
efree(date_fmt);
|
||||
|
||||
Reference in New Issue
Block a user