Skip to content

Commit d2a9918

Browse files
committed
changes from feedback
1 parent fd7cb52 commit d2a9918

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ext/pdo_pgsql/pgsql_driver.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,8 @@ void pgsqlCopyFromArray_internal(INTERNAL_FUNCTION_PARAMETERS)
662662
Z_PARAM_ITERABLE(pg_rows)
663663
Z_PARAM_OPTIONAL
664664
Z_PARAM_STRING(pg_delim, pg_delim_len)
665-
Z_PARAM_STRING_OR_NULL(pg_null_as, pg_null_as_len)
666-
Z_PARAM_STRING(pg_fields, pg_fields_len)
665+
Z_PARAM_STRING(pg_null_as, pg_null_as_len)
666+
Z_PARAM_STRING_OR_NULL(pg_fields, pg_fields_len)
667667
ZEND_PARSE_PARAMETERS_END();
668668

669669
dbh = Z_PDO_DBH_P(ZEND_THIS);
@@ -717,6 +717,9 @@ void pgsqlCopyFromArray_internal(INTERNAL_FUNCTION_PARAMETERS)
717717

718718
if (iter->funcs->rewind) {
719719
iter->funcs->rewind(iter);
720+
if (EG(exception)) {
721+
RETURN_THROWS();
722+
}
720723
}
721724

722725
for (; iter->funcs->valid(iter) == SUCCESS && EG(exception) == NULL; iter->funcs->move_forward(iter)) {

0 commit comments

Comments
 (0)