Skip to content

Commit c48266c

Browse files
committed
address review
1 parent 9274675 commit c48266c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ext/pgsql/pgsql.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,10 +1873,8 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
18731873
zval dataset;
18741874

18751875
ZVAL_COPY_VALUE(&dataset, return_value);
1876-
object_init_ex(return_value, ce);
1877-
if (UNEXPECTED(EG(exception))) {
1878-
zval_ptr_dtor(&dataset);
1879-
zval_ptr_dtor(return_value);
1876+
zend_result obj_initialized = object_init_ex(return_value, ce);
1877+
if (UNEXPECTED(obj_initialized == FAILURE)) {
18801878
RETURN_THROWS();
18811879
}
18821880
if (!ce->default_properties_count && !ce->__set) {

ext/pgsql/tests/pg_fetch_object_with_abstract_class.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ try {
4646
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
4747
}
4848

49+
?>
4950
--CLEAN--
5051
<?php
5152
include('config.inc');

0 commit comments

Comments
 (0)