mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
- Fix crash with invalid localtime on Win32 systems.
This commit is contained in:
parent
cb0a09808f
commit
fe6e7058ee
1 changed files with 5 additions and 1 deletions
|
@ -586,7 +586,11 @@ PHP_FUNCTION(localtime)
|
|||
assoc_array = Z_LVAL_PP(assoc_array_arg);
|
||||
break;
|
||||
}
|
||||
ta = php_localtime_r(×tamp, &tmbuf);
|
||||
if (NULL == (ta = php_localtime_r(×tamp, &tmbuf))) {
|
||||
php_error(E_WARNING, "%s(): invalid local time",
|
||||
get_active_function_name(TSRMLS_C));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (array_init(return_value) == FAILURE) {
|
||||
php_error(E_ERROR, "Cannot prepare return array from localtime");
|
||||
RETURN_FALSE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue