com php-src: fix 's' vs 'S' for datetime: ext/date/php_date .c

From: Date: Wed, 16 Oct 2013 09:31:20 +0000
Subject: com php-src: fix 's' vs 'S' for datetime: ext/date/php_date .c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73514@lists.php.net to get a copy of this message
Commit: 86c9a6f90133c748cc562f3efdc96b57cccbbe30 Author: Anatol Belski <ab@php.net> Thu, 11 Jul 2013 02:58:53 -0700 Parents: dc43044ffbd2b243c5949bd627d855b9dcf005a7 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=86c9a6f90133c748cc562f3efdc96b57cccbbe30 Log: fix 's' vs 'S' for datetime Changed paths: M ext/date/php_date.c Diff: diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 3f59193..7c7a95a 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -1435,7 +1435,7 @@ PHP_FUNCTION(strtotime) tzi = get_timezone_info(TSRMLS_C); - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "sl", &times, &time_len, &preset_ts) != FAILURE) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "Sl", &times, &time_len, &preset_ts) != FAILURE) { /* We have an initial timestamp */ now = timelib_time_ctor(); @@ -1448,7 +1448,7 @@ PHP_FUNCTION(strtotime) timelib_unixtime2local(now, t->sse); timelib_time_dtor(t); efree(initial_ts); - } else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &times, &time_len, &preset_ts) != FAILURE) { + } else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &times, &time_len, &preset_ts) != FAILURE) { /* We have no initial timestamp */ now = timelib_time_ctor(); now->tz_info = tzi; @@ -4389,7 +4389,7 @@ PHP_METHOD(DatePeriod, __construct) zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "OOl|l", &start, date_ce_interface, &interval, date_ce_interval, &recurrences, &options) == FAILURE) { if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "OOO|l", &start, date_ce_interface, &interval, date_ce_interval, &end, date_ce_date, &options) == FAILURE) { - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &isostr, &isostr_len, &options) == FAILURE) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &isostr, &isostr_len, &options) == FAILURE) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "This constructor accepts either (DateTimeInterface, DateInterval, int) OR (DateTimeInterface, DateInterval, DateTime) OR (string) as arguments."); zend_restore_error_handling(&error_handling TSRMLS_CC); return;

« previous php.cvs (#73514) next »