]> granicus.if.org Git - php/commitdiff
Add "wrong param count"/"expecting parameter .. to be.." warning to strtotime()
authorHannes Magnusson <bjori@php.net>
Sat, 7 Oct 2006 22:31:52 +0000 (22:31 +0000)
committerHannes Magnusson <bjori@php.net>
Sat, 7 Oct 2006 22:31:52 +0000 (22:31 +0000)
ext/date/php_date.c

index 8437b80508293be21130ffa8da14e00e178f1908..cbe0d491cdb50ba998cd5a130d5d77e804822017 100644 (file)
@@ -1204,7 +1204,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", &times, &time_len) != 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;