derick Wed Oct 12 15:49:37 2005 EDT Modified files: /php-src/ext/date php_date.c Log: - 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. http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.61&r2=1.62&ty=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.61 php-src/ext/date/php_date.c:1.62 --- php-src/ext/date/php_date.c:1.61 Mon Oct 10 12:41:40 2005 +++ php-src/ext/date/php_date.c Wed Oct 12 15:49:35 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c,v 1.61 2005/10/10 16:41:40 derick Exp $ */ +/* $Id: php_date.c,v 1.62 2005/10/12 19:49:35 derick Exp $ */ #include "php.h" #include "php_streams.h" @@ -192,9 +192,7 @@ { timelib_tzinfo **tzi = (timelib_tzinfo **)tzinfo; - if (*tzi) { - timelib_tzinfo_dtor(*tzi); - } + timelib_tzinfo_dtor(*tzi); } /* {{{ PHP_RINIT_FUNCTION */ @@ -291,7 +289,9 @@ } 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; } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php