]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #45004 (pg_insert() does not accept 4 digit timezone format)
authorIlia Alshanetsky <iliaa@php.net>
Mon, 19 May 2008 15:18:39 +0000 (15:18 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 19 May 2008 15:18:39 +0000 (15:18 +0000)
NEWS
ext/pgsql/pgsql.c

diff --git a/NEWS b/NEWS
index 256f27a8ca23bcd30ad7053474113c0117d34e21..98329a2f9781461ad23180d2a88bb4f462b8e236 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ PHP                                                                        NEWS
 - Fixed a crash inside PDO when trying instantiate PDORow manually (Felipe)
 - Fixed build failure of ext/mysqli with libmysql 6.0 - missing rpl
   functions. (Andrey)
+- Fixed bug #45004 (pg_insert() does not accept 4 digit timezone format).
+  (Ilia)
 - Fixed bug #44891 Memory leak using registerPHPFunctions and XSLT Variable 
   as function parameter. (Rob)
 - Fixed bug #44830 (Very minor issue with backslash in heredoc). (Matt)
index 65b62fa63c5ab82f440c940091da940cf1878bf4..8f4b0e6531dcd739519e537e87af3e1e886dd1c5 100644 (file)
@@ -5003,7 +5003,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,50})){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,4}(:[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);