diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-07 16:00:01 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-07 16:00:29 +0100 |
| commit | ba5cb2eb325ffb933e4120c173c44e2e674e1506 (patch) | |
| tree | 3d966451bb23aafd36d5f7b554bf78ed52600754 | |
| parent | 711e1fb33b06c9da7baed028ea912c189f33f442 (diff) | |
| download | php-git-ba5cb2eb325ffb933e4120c173c44e2e674e1506.tar.gz | |
Remove unnecessary uses of object_and_properties_init
Use object_init_ex instead if the properties are NULL.
| -rw-r--r-- | ext/mysqli/mysqli.c | 2 | ||||
| -rw-r--r-- | ext/pgsql/pgsql.c | 2 | ||||
| -rw-r--r-- | ext/reflection/php_reflection.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index f74df1facb..f3d5e82309 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -1267,7 +1267,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags ZVAL_COPY_VALUE(&dataset, return_value); - object_and_properties_init(return_value, ce, NULL); + object_init_ex(return_value, ce); if (!ce->default_properties_count && !ce->__set) { Z_OBJ_P(return_value)->properties = Z_ARR(dataset); } else { diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 66b4a15290..8d448bfe61 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2797,7 +2797,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_ zval retval; ZVAL_COPY_VALUE(&dataset, return_value); - object_and_properties_init(return_value, ce, NULL); + object_init_ex(return_value, ce); if (!ce->default_properties_count && !ce->__set) { Z_OBJ_P(return_value)->properties = Z_ARR(dataset); } else { diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 2796c7b7a8..9748594fa5 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1300,7 +1300,7 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c } /* Create object */ - if (object_and_properties_init(&reflector, ce_ptr, NULL) == FAILURE) { + if (object_init_ex(&reflector, ce_ptr) == FAILURE) { _DO_THROW("Could not create reflector"); } |
