mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
Fixed bug #35630 (strtotime() crashes on certain relative identifiers).
This commit is contained in:
parent
bc22352c30
commit
cdb699b497
4 changed files with 6629 additions and 10454 deletions
2
NEWS
2
NEWS
|
@ -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
|
@ -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;
|
||||
|
||||
*/
|
||||
|
||||
|
|
11
ext/date/tests/bug35630.phpt
Normal file
11
ext/date/tests/bug35630.phpt
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue