cvs: php-src(PHP_5_2) /ext/session session.c
| From: | Scott MacVicar | Date: | Thu, 11 Dec 2008 01:21:42 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/session session.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-54850@lists.php.net to get a copy of this message | ||
scottmac Thu Dec 11 01:21:42 2008 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/session session.c
Log:
MFH Fix bug #35975 - Session cookie expires date format isn't the most compatible. Sync to
that of setcookie().
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.44&r2=1.417.2.8.2.45&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.44 php-src/ext/session/session.c:1.417.2.8.2.45
--- php-src/ext/session/session.c:1.417.2.8.2.44 Wed Aug 6 21:28:38 2008
+++ php-src/ext/session/session.c Thu Dec 11 01:21:42 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session.c,v 1.417.2.8.2.44 2008/08/06 21:28:38 kalle Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.45 2008/12/11 01:21:42 scottmac Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -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 @@
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);