mike            Tue Aug  1 16:45:40 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/date   php_date.c 
  Log:
  MFH: use library error message on time string parse failure
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.22&r2=1.43.2.45.2.23&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.22 
php-src/ext/date/php_date.c:1.43.2.45.2.23
--- php-src/ext/date/php_date.c:1.43.2.45.2.22  Tue Aug  1 15:55:03 2006
+++ php-src/ext/date/php_date.c Tue Aug  1 16:45:40 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.22 2006/08/01 15:55:03 mike Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.23 2006/08/01 16:45:40 mike Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1556,7 +1556,9 @@
        dateobj->time = timelib_strtotime(time_str_len ? time_str : "now", 
time_str_len ? time_str_len : sizeof("now") -1, &err, DATE_TIMEZONEDB);
        if (err) {
                if (err->error_count) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to 
parse time string (%s)", time_str);
+                       /* spit out the first library error message, at least */
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to 
parse time string (%s) at position %d (%c): %s", time_str,
+                                                       
err->error_messages[0].position, err->error_messages[0].character, 
err->error_messages[0].message);
                }
                timelib_error_container_dtor(err);
        }

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

Reply via email to