iliaa Fri Nov 23 00:16:49 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date php_date.c Log: MFB: Fixed bug #43377 (PHP crashes with invalid argument for DateTimeZone) http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51&r2=1.43.2.45.2.52&diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51 php-src/ext/date/php_date.c:1.43.2.45.2.52 --- php-src/ext/date/php_date.c:1.43.2.45.2.51 Thu Jul 12 18:59:05 2007 +++ php-src/ext/date/php_date.c Fri Nov 23 00:16:48 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c,v 1.43.2.45.2.51 2007/07/12 18:59:05 derick Exp $ */ +/* $Id: php_date.c,v 1.43.2.45.2.52 2007/11/23 00:16:48 iliaa Exp $ */ #include "php.h" #include "php_streams.h" @@ -2066,6 +2066,8 @@ if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &tz, &tz_len)) { if (SUCCESS == timezone_initialize(&tzi, tz TSRMLS_CC)) { ((php_timezone_obj *) zend_object_store_get_object(getThis() TSRMLS_CC))->tz = tzi; + } else { + ZVAL_NULL(getThis()); } } php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php