Fixed bug #51725 (xmlrpc_get_type() returns true on invalid dates). (Mike)

This commit is contained in:
Michael Wallner 2010-05-12 09:37:25 +00:00
parent 87b4f2a79d
commit ad15797925
2 changed files with 8 additions and 1 deletions

1
NEWS
View File

@ -46,6 +46,7 @@ PHP NEWS
- Fixed bug #51732 (Fileinfo __construct or open does not work with NULL).
(Pierre)
- Fixed bug #51725 (xmlrpc_get_type() returns true on invalid dates). (Mike)
- Fixed bug #51723 (Content-length header is limited to 32bit integer with
Apache2 on Windows). (Pierre)
- Fixed bug #51721 (mark DOMNodeList and DOMNamedNodeMap as Traversable).

View File

@ -1362,10 +1362,16 @@ PHPAPI void php_date_set_tzdb(timelib_tzdb *tzdb)
PHPAPI signed long php_parse_date(char *string, signed long *now)
{
timelib_time *parsed_time;
timelib_error_container *error = NULL;
int error2;
signed long retval;
parsed_time = timelib_strtotime(string, strlen(string), NULL, DATE_TIMEZONEDB);
parsed_time = timelib_strtotime(string, strlen(string), &error, DATE_TIMEZONEDB);
if (error->error_count) {
timelib_error_container_dtor(error);
return -1;
}
timelib_error_container_dtor(error);
timelib_update_ts(parsed_time, NULL);
retval = timelib_date_to_int(parsed_time, &error2);
timelib_time_dtor(parsed_time);