FIX #77047: fixes regex for "time" data type

This commit is contained in:
andy 2018-10-22 08:57:28 -06:00 committed by Anatol Belski
parent cf764f02b3
commit 369c991d5c

View 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;