mirror of
https://github.com/php/php-src.git
synced 2026-04-17 21:11:02 +02:00
Fixes among others: . Bug #79580 (date_create_from_format misses leap year). . Bug #80974 (Wrong diff between 2 dates in different timezones). . Bug #81097 (DateTimeZone silently falls back to UTC when providing an offset with seconds). . Bug #81273 (Date interval calculation not correct).
43 lines
671 B
PHP
43 lines
671 B
PHP
--TEST--
|
|
Bug #67253 (timelib_meridian_with_check out-of-bounds read)
|
|
--INI--
|
|
date.timezone=Europe/Berlin
|
|
--FILE--
|
|
<?php
|
|
$z = '';
|
|
var_dump(date_parse_from_format("aHa0", "0=G{$z}9UCNnF"));
|
|
?>
|
|
--EXPECT--
|
|
array(12) {
|
|
["year"]=>
|
|
bool(false)
|
|
["month"]=>
|
|
bool(false)
|
|
["day"]=>
|
|
bool(false)
|
|
["hour"]=>
|
|
bool(false)
|
|
["minute"]=>
|
|
bool(false)
|
|
["second"]=>
|
|
bool(false)
|
|
["fraction"]=>
|
|
bool(false)
|
|
["warning_count"]=>
|
|
int(0)
|
|
["warnings"]=>
|
|
array(0) {
|
|
}
|
|
["error_count"]=>
|
|
int(3)
|
|
["errors"]=>
|
|
array(2) {
|
|
[0]=>
|
|
string(29) "A meridian could not be found"
|
|
[9]=>
|
|
string(12) "Data missing"
|
|
}
|
|
["is_localtime"]=>
|
|
bool(false)
|
|
}
|