]> granicus.if.org Git - php/commitdiff
MFH: Add "wrong param" warning to strtotime()
authorHannes Magnusson <bjori@php.net>
Fri, 3 Nov 2006 15:06:51 +0000 (15:06 +0000)
committerHannes Magnusson <bjori@php.net>
Fri, 3 Nov 2006 15:06:51 +0000 (15:06 +0000)
README.UPDATE_5_2
ext/date/php_date.c

index 4470a23f4c83a5a9d0968edb6e51d917f924fb06..78f69c816a1bda63708efc0971e4e18da61b35c5 100644 (file)
@@ -309,6 +309,16 @@ bzopen($fp, "r");
 
 ?>
 
+In the date extension
+=====================
+
+<?php
+
+strtotime("today", "now");'
+/* Warning:  strtotime() expects parameter 2 to be long, string given in filename on line n */
+
+?>
+
 In the dBase extension
 ======================
 
index 687ca122ca24368e38400ca2a0371d182eb9bc25..2743f9949c8ead584f1e86072748c20bf65aa891 100644 (file)
@@ -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", &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;