mirror of
https://github.com/php/php-src.git
synced 2025-01-10 21:14:37 +08:00
- MFH: Apperently you can't store NULL pointer values into Zend hashes - god
know why not - so we won't store those in the cache anymore.
This commit is contained in:
parent
49678f0908
commit
cd90395cb6
@ -190,9 +190,7 @@ static void _php_date_tzinfo_dtor(void *tzinfo)
|
||||
{
|
||||
timelib_tzinfo **tzi = (timelib_tzinfo **)tzinfo;
|
||||
|
||||
if (*tzi) {
|
||||
timelib_tzinfo_dtor(*tzi);
|
||||
}
|
||||
timelib_tzinfo_dtor(*tzi);
|
||||
}
|
||||
|
||||
/* {{{ PHP_RINIT_FUNCTION */
|
||||
@ -289,7 +287,9 @@ static timelib_tzinfo *php_date_parse_tzfile(char *formal_tzname, timelib_tzdb *
|
||||
}
|
||||
|
||||
tzi = timelib_parse_tzfile(formal_tzname, tzdb);
|
||||
zend_hash_add(&DATEG(tzcache), formal_tzname, strlen(formal_tzname) + 1, (void *) &tzi, sizeof(timelib_tzinfo*), NULL);
|
||||
if (tzi) {
|
||||
zend_hash_add(&DATEG(tzcache), formal_tzname, strlen(formal_tzname) + 1, (void *) &tzi, sizeof(timelib_tzinfo*), NULL);
|
||||
}
|
||||
return tzi;
|
||||
}
|
||||
/* }}} */
|
||||
|
Loading…
Reference in New Issue
Block a user