iliaa Sun Mar 9 18:09:53 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/date php_date.c Log: Initialize ts only after successful argument parsing http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.22&r2=1.43.2.45.2.51.2.23&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.2.22 php-src/ext/date/php_date.c:1.43.2.45.2.51.2.23 --- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.22 Fri Mar 7 02:04:40 2008 +++ php-src/ext/date/php_date.c Sun Mar 9 18:09:53 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c,v 1.43.2.45.2.51.2.22 2008/03/07 02:04:40 iliaa Exp $ */ +/* $Id: php_date.c,v 1.43.2.45.2.51.2.23 2008/03/09 18:09:53 iliaa Exp $ */ #include "php.h" #include "php_streams.h" @@ -899,12 +899,12 @@ long ts; char *string; - if (ZEND_NUM_ARGS() == 1) { - ts = time(NULL); - } if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &format, &format_len, &ts) == FAILURE) { RETURN_FALSE; } + if (ZEND_NUM_ARGS() == 1) { + ts = time(NULL); + } string = php_format_date(format, format_len, ts, localtime TSRMLS_CC);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php