bjori           Fri Nov  3 15:06:51 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/date   php_date.c 
    /php-src    README.UPDATE_5_2 
  Log:
  MFH: Add "wrong param" warning to strtotime()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.32&r2=1.43.2.45.2.33&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.32 
php-src/ext/date/php_date.c:1.43.2.45.2.33
--- php-src/ext/date/php_date.c:1.43.2.45.2.32  Fri Nov  3 14:38:45 2006
+++ php-src/ext/date/php_date.c Fri Nov  3 15:06:51 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.32 2006/11/03 14:38:45 bjori Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.33 2006/11/03 15:06:51 bjori Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1083,7 +1083,7 @@
                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;
http://cvs.php.net/viewvc.cgi/php-src/README.UPDATE_5_2?r1=1.1.2.27&r2=1.1.2.28&diff_format=u
Index: php-src/README.UPDATE_5_2
diff -u php-src/README.UPDATE_5_2:1.1.2.27 php-src/README.UPDATE_5_2:1.1.2.28
--- php-src/README.UPDATE_5_2:1.1.2.27  Fri Nov  3 07:27:52 2006
+++ php-src/README.UPDATE_5_2   Fri Nov  3 15:06:51 2006
@@ -309,6 +309,16 @@
 
 ?>
 
+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
 ======================
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to