From: andy Date: Mon, 22 Oct 2018 14:57:28 +0000 (-0600) Subject: FIX #77047: fixes regex for "time" data type X-Git-Tag: php-7.3.0RC6~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=369c991d;p=php FIX #77047: fixes regex for "time" data type --- diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 41d3a0a28d..129a6dd2db 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -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;