Skip to content

Commit 1cc536a

Browse files
committed
Revert "Backport patch for bug #71820"
This reverts commit 1b632cf. This fixed bug #72151, and reverts the fix for bug #71820. See also bug #50636 and #49521 for the history.
1 parent 41b159f commit 1cc536a

File tree

4 files changed

+2
-225
lines changed

4 files changed

+2
-225
lines changed

ext/mysqli/mysqli.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,13 +1295,9 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
12951295
zend_fcall_info fci;
12961296
zend_fcall_info_cache fcc;
12971297
zval *retval_ptr;
1298-
zend_bool props_merged = 0;
12991298

13001299
object_and_properties_init(return_value, ce, NULL);
1301-
if (!ce->__set) {
1302-
props_merged = 1;
1303-
zend_merge_properties(return_value, Z_ARRVAL(dataset), 1 TSRMLS_CC);
1304-
}
1300+
zend_merge_properties(return_value, Z_ARRVAL(dataset), 1 TSRMLS_CC);
13051301

13061302
if (ce->constructor) {
13071303
fci.size = sizeof(fci);
@@ -1335,10 +1331,6 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
13351331

13361332
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
13371333
zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
1338-
if (fci.params) {
1339-
efree(fci.params);
1340-
}
1341-
return;
13421334
} else {
13431335
if (retval_ptr) {
13441336
zval_ptr_dtor(&retval_ptr);
@@ -1349,11 +1341,6 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
13491341
}
13501342
} else if (ctor_params) {
13511343
zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
1352-
return;
1353-
}
1354-
1355-
if (!props_merged) {
1356-
zend_merge_properties(return_value, Z_ARRVAL(dataset), 1 TSRMLS_CC);
13571344
}
13581345
}
13591346
}

ext/mysqli/tests/bug71820.phpt

Lines changed: 0 additions & 104 deletions
This file was deleted.

ext/pgsql/pgsql.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2784,13 +2784,9 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type,
27842784
zend_fcall_info fci;
27852785
zend_fcall_info_cache fcc;
27862786
zval *retval_ptr;
2787-
zend_bool props_merged = 0;
27882787

27892788
object_and_properties_init(return_value, ce, NULL);
2790-
if (!ce->__set) {
2791-
props_merged = 1;
2792-
zend_merge_properties(return_value, Z_ARRVAL(dataset), 1 TSRMLS_CC);
2793-
}
2789+
zend_merge_properties(return_value, Z_ARRVAL(dataset), 1 TSRMLS_CC);
27942790

27952791
if (ce->constructor) {
27962792
fci.size = sizeof(fci);
@@ -2824,10 +2820,6 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type,
28242820

28252821
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
28262822
zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
2827-
if (fci.params) {
2828-
efree(fci.params);
2829-
}
2830-
return;
28312823
} else {
28322824
if (retval_ptr) {
28332825
zval_ptr_dtor(&retval_ptr);
@@ -2838,11 +2830,6 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type,
28382830
}
28392831
} else if (ctor_params) {
28402832
zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
2841-
return;
2842-
}
2843-
2844-
if (!props_merged) {
2845-
zend_merge_properties(return_value, Z_ARRVAL(dataset), 1 TSRMLS_CC);
28462833
}
28472834
}
28482835
}

ext/pgsql/tests/bug71820.phpt

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)