diff options
| author | Hannes Magnusson <bjori@php.net> | 2006-11-06 16:11:26 +0000 |
|---|---|---|
| committer | Hannes Magnusson <bjori@php.net> | 2006-11-06 16:11:26 +0000 |
| commit | c2639290023649e6a2678b853edd2917768480b5 (patch) | |
| tree | 83252d17ac457c5b4e5d6cbd88c4aa0dddba0489 /ext/date/php_date.c | |
| parent | c32408e6940749ea3d54c020f87139b84cdeb184 (diff) | |
| download | php-git-c2639290023649e6a2678b853edd2917768480b5.tar.gz | |
MFH: throw exception on invalid parameters
Diffstat (limited to 'ext/date/php_date.c')
| -rw-r--r-- | ext/date/php_date.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 2743f9949c..c5502daf2e 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -1679,11 +1679,11 @@ PHP_METHOD(DateTime, __construct) char *time_str = NULL; int time_str_len = 0; + php_set_error_handling(EH_THROW, NULL TSRMLS_CC); if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO", &time_str, &time_str_len, &timezone_object, date_ce_timezone)) { - php_set_error_handling(EH_THROW, NULL TSRMLS_CC); date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, timezone_object TSRMLS_CC); - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ |
