Skip to content

Commit ba5cb2e

Browse files
committed
Remove unnecessary uses of object_and_properties_init
Use object_init_ex instead if the properties are NULL.
1 parent 711e1fb commit ba5cb2e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

ext/mysqli/mysqli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
12671267

12681268
ZVAL_COPY_VALUE(&dataset, return_value);
12691269

1270-
object_and_properties_init(return_value, ce, NULL);
1270+
object_init_ex(return_value, ce);
12711271
if (!ce->default_properties_count && !ce->__set) {
12721272
Z_OBJ_P(return_value)->properties = Z_ARR(dataset);
12731273
} else {

ext/pgsql/pgsql.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2797,7 +2797,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
27972797
zval retval;
27982798

27992799
ZVAL_COPY_VALUE(&dataset, return_value);
2800-
object_and_properties_init(return_value, ce, NULL);
2800+
object_init_ex(return_value, ce);
28012801
if (!ce->default_properties_count && !ce->__set) {
28022802
Z_OBJ_P(return_value)->properties = Z_ARR(dataset);
28032803
} else {

ext/reflection/php_reflection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c
13001300
}
13011301

13021302
/* Create object */
1303-
if (object_and_properties_init(&reflector, ce_ptr, NULL) == FAILURE) {
1303+
if (object_init_ex(&reflector, ce_ptr) == FAILURE) {
13041304
_DO_THROW("Could not create reflector");
13051305
}
13061306

0 commit comments

Comments
 (0)