]> granicus.if.org Git - php/commitdiff
FIX #77047: fixes regex for "time" data type
authorandy <andy@gajetzki.com>
Mon, 22 Oct 2018 14:57:28 +0000 (08:57 -0600)
committerAnatol Belski <ab@php.net>
Sun, 18 Nov 2018 10:50:32 +0000 (11:50 +0100)
ext/pgsql/pgsql.c

index 41d3a0a28d36146d39fffd178df491d837d5fca6..129a6dd2db008ad5de82c0f9164f17112b3f513d 100644 (file)
@@ -6267,7 +6267,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con
                                                        ZVAL_STRINGL(&new_val, "NULL", sizeof("NULL")-1);
                                                }
                                                else {
-#define REGEX0 "^(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1})){0,1}$"
+#define REGEX0 "^(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1}){0,1}$"
                                                        /* FIXME: better regex must be used */
                                                        if (php_pgsql_convert_match(Z_STRVAL_P(val), Z_STRLEN_P(val), REGEX0, sizeof(REGEX0)-1, 1) == FAILURE) {
                                                                err = 1;