]> granicus.if.org Git - php/commitdiff
Fixed bug #42506 (php_pgsql_convert() timezone parse bug)
authorIlia Alshanetsky <iliaa@php.net>
Mon, 3 Sep 2007 15:36:04 +0000 (15:36 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 3 Sep 2007 15:36:04 +0000 (15:36 +0000)
NEWS
ext/pgsql/pgsql.c

diff --git a/NEWS b/NEWS
index 9264a18bf17d2b8f4dc41830be72e85d09f11c0c..3b10039cf2c9f012bef5283b89504a3e62c29101 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ PHP                                                                        NEWS
 
 - Fixed bug #42512 (ip2long('255.255.255.255') should return 4294967295 on
   64-bit PHP). (Derick)
+- Fixed bug #42506 (php_pgsql_convert() timezone parse bug) (nonunnet at
+  gmail dot com, Ilia)
 - Fixed bug #42462 (Segmentation when trying to set an attribute in a 
   DOMElement). (Rob)
 - Fixed bug #42453 (CGI SAPI does not shut down cleanly with -i/-m/-v cmdline
index 508011617a442302a75bf019d713471d398a62e3..eedcf84ccdd5bec8950ee26ec85f9a6e504286ce 100644 (file)
@@ -5001,7 +5001,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con
                                                        ZVAL_STRINGL(new_val, "NOW()", sizeof("NOW()")-1, 1);
                                                } else {
                                                        /* FIXME: better regex must be used */
-                                                       if (php_pgsql_convert_match(Z_STRVAL_PP(val), "^([0-9]{4}[/-][0-9]{1,2}[/-][0-9]{1,2})([ \\t]+(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1}(\\.[0-9]+){0,1}([ \\t]*([+-][0-9]{1,2}(:[0-9]{1,2}){0,1}|[a-zA-Z]{1,5})){0,1})){0,1}$", 1 TSRMLS_CC) == FAILURE) {
+                                                       if (php_pgsql_convert_match(Z_STRVAL_PP(val), "^([0-9]{4}[/-][0-9]{1,2}[/-][0-9]{1,2})([ \\t]+(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1}(\\.[0-9]+){0,1}([ \\t]*([+-][0-9]{1,2}(:[0-9]{1,2}){0,1}|[-a-zA-Z_/+]{1,50})){0,1})){0,1}$", 1 TSRMLS_CC) == FAILURE) {
                                                                err = 1;
                                                        } else {
                                                                ZVAL_STRING(new_val, Z_STRVAL_PP(val), 1);