mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-27 02:45:42 +00:00
fix 's' vs 'S' for datetime
This commit is contained in:
1 parent
dc43044ffb
commit
86c9a6f901
1 file changed
+3
-3
+3
-3
@@ -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", ×, &time_len, &preset_ts) != FAILURE) {
|
||||
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "Sl", ×, &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", ×, &time_len, &preset_ts) != FAILURE) {
|
||||
} else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", ×, &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;
|
||||
|
||||
Reference in new issue
Block a user