php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49394 Probable date_format regression due to #48058
Submitted: 2009-08-27 20:43 UTC Modified: 2009-08-28 17:42 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: hjones at hopone dot net Assigned:
Status: Closed Package: Strings related
PHP Version: 5.2.10 OS: Solaris 9 (Sparc V9; 64-bit)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hjones at hopone dot net
New email:
PHP Version: OS:

 

 [2009-08-27 20:43 UTC] hjones at hopone dot net
Description:
------------
Upgrading from 5.2.9 to 5.2.10 causes setcookie() to return the year '0000' instead of '2009' when used with time() as the cookie expiry.

Replacing 5.2.10's ext/date/php_date.{c,h} with 5.2.9's copy and recompiling corrects this issue.

I believe this is a regression caused by PHP bug #48058

Reproduce code:
---------------
<?php

setcookie("php_test_cookie", "test_cookie_value", time() + 1444000);

?>

Expected result:
----------------
Set-Cookie: php_test_cookie=test_cookie_value; expires=Sun, 13-Sep-2009 11:31:54 GMT

Actual result:
--------------
Set-Cookie: php_test_cookie=test_cookie_value; expires=Sun, 13-Sep-0000 11:31:54 GMT

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-27 20:49 UTC] hjones at hopone dot net
PHP was compiled with the following GCC:

# gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.3.2
 [2009-08-27 21:27 UTC] derick@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

This is already fixed in SVN, please try a snapshot.
 [2009-08-28 17:42 UTC] srinatar@php.net
the fix for this bug was delivered as part of fix for bug:48276 ( http://bugs.php.net/bug.php?id=48276). if you wish, you can use 5.2.11RC1 candidate build available from 
http://downloads.php.net/ilia/php-5.2.11RC1.tar.bz2

pl. note that these RC1 builds are meant for testing and not production.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 05:01:31 2024 UTC