Fixed bug #35630 (strtotime() crashes on certain relative identifiers).

This commit is contained in:
Ilia Alshanetsky 2005-12-13 02:28:39 +00:00
parent bc22352c30
commit cdb699b497
4 changed files with 6629 additions and 10454 deletions

2
NEWS
View file

@ -26,6 +26,8 @@ PHP NEWS
- Fixed many bugs in OCI8. (Tony)
- Fixed crash and leak in mysqli when using 4.1.x client libraries and
connecting to 5.x server. (Andrey)
- Fixed bug #35630 (strtotime() crashes on certain relative identifiers).
(Ilia)
- Fixed bug #35629 (crash in http:// wrapper on multiple redirects). (Ilia)
- Fixed bug #35624 (strtotime() does not handle 3 character weekdays). (Ilia)
- Fixed bug #35612 (iis6 Access Violation crash). (Dmitry, alacn.uhahaa)

File diff suppressed because it is too large Load diff

View file

@ -822,8 +822,8 @@ reltextnumber = 'first'|'next'|'second'|'third'|'fourth'|'fifth'|'sixth'|'sevent
reltextunit = (('sec'|'second'|'min'|'minute'|'hour'|'day'|'week'|'fortnight'|'forthnight'|'month'|'year') 's'?) | daytext;
relnumber = ([+-]?[ ]*[0-9]+);
relative = (relnumber space? reltextunit)+;
relativetext = (reltextnumber space? reltextunit)+;
relative = relnumber space? reltextunit;
relativetext = reltextnumber space? reltextunit;
*/

View file

@ -0,0 +1,11 @@
--TEST--
Bug #35630 (strtotime() crashes on non-separated relative modifiers)
--FILE--
<?php
date_default_timezone_set("UTC");
echo date(DATE_ISO8601, strtotime('5 january 2006+3day+1day')) . "\n";
?>
--EXPECT--
2006-01-09T00:00:00+0000