diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2008-05-19 15:16:47 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2008-05-19 15:16:47 +0000 |
commit | 01da46b1bb8b75299a9f5bf7d507e4972f891675 (patch) | |
tree | 3aa941f0651dc25a64525c9a95f21f8626054206 /ext/pgsql | |
parent | 2b20e3d9140ed39281a80f60bfd5ebcf571b5721 (diff) | |
download | php-git-01da46b1bb8b75299a9f5bf7d507e4972f891675.tar.gz |
Fixed bug #45004 (pg_insert() does not accept 4 digit timezone format)
Diffstat (limited to 'ext/pgsql')
-rw-r--r-- | ext/pgsql/pgsql.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index f42d9393a9..d279480492 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -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); |