From 91c604d584e858bba4fadc2ad0d53ccb3e206191 Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Fri, 3 Nov 2006 15:06:51 +0000 Subject: [PATCH] MFH: Add "wrong param" warning to strtotime() --- README.UPDATE_5_2 | 10 ++++++++++ ext/date/php_date.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.UPDATE_5_2 b/README.UPDATE_5_2 index 4470a23f4c..78f69c816a 100644 --- a/README.UPDATE_5_2 +++ b/README.UPDATE_5_2 @@ -309,6 +309,16 @@ bzopen($fp, "r"); ?> +In the date extension +===================== + + + In the dBase extension ====================== diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 687ca122ca..2743f9949c 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -1083,7 +1083,7 @@ PHP_FUNCTION(strtotime) timelib_unixtime2local(now, t->sse); timelib_time_dtor(t); efree(initial_ts); - } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s", ×, &time_len) != 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; -- 2.50.1