summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2002-10-19 06:05:16 +0000
committerYasuo Ohgaki <yohgaki@php.net>2002-10-19 06:05:16 +0000
commit572b2a5a5aa3a5f3f23880355a79631a0ea96f5e (patch)
tree833d2abb0ba6c62ab5cf461b76a7ce95ab51dc6a /ext/pgsql/pgsql.c
parent29a53a47f6fa8cee9809cc3d766bb81373093a80 (diff)
downloadphp-git-572b2a5a5aa3a5f3f23880355a79631a0ea96f5e.tar.gz
Revert invalid patch. It seems the real problem is in php error
function(s). It exits with return code -1 when php_error_docref() is called. There is custom error handler and without custom error handler, it is working.
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 48bcc26291..bdde2d5697 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -3356,7 +3356,6 @@ PHPAPI int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval
zend_hash_get_current_data_ex(Z_ARRVAL_P(values), (void **)&val, &pos) == SUCCESS;
zend_hash_move_forward_ex(Z_ARRVAL_P(values), &pos)) {
skip_field = 0;
- MAKE_STD_ZVAL(new_val);
if ((key_type = zend_hash_get_current_key_ex(Z_ARRVAL_P(values), &field, &field_len, &num_idx, 0, &pos)) == HASH_KEY_NON_EXISTANT) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to get array key type");
@@ -3393,10 +3392,9 @@ PHPAPI int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval
err = 1;
}
if (err) {
- skip_field = 1; /* prevent adding invalid feild */
- break;
+ break; /* break out for() */
}
-
+ MAKE_STD_ZVAL(new_val);
switch(php_pgsql_get_data_type(Z_STRVAL_PP(type), Z_STRLEN_PP(type)))
{
case PG_BOOL:
@@ -3884,7 +3882,7 @@ PHPAPI int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval
if (err) {
zval_dtor(new_val);
FREE_ZVAL(new_val);
- break;
+ break; /* break out for() */
}
if (!skip_field) {
/* If field is NULL and HAS DEFAULT, should be skipped */