Skip to content

Commit b3a0d19

Browse files
jmikoladerickr
authored andcommitted
PHPC-373: Additional MAKE_STD_ZVAL() cleanup
1 parent 29bf338 commit b3a0d19

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/BSON/Javascript.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,7 @@ HashTable *php_phongo_javascript_get_debug_info(zval *object, int *is_temp TSRML
158158
if (intern->document) {
159159
php_phongo_bson_state state = PHONGO_BSON_STATE_INITIALIZER;
160160

161-
MAKE_STD_ZVAL(state.zchild);
162-
163-
if (bson_to_zval(bson_get_data(intern->document), intern->document->len, &state)) {
161+
if (bson_to_zval_ex(bson_get_data(intern->document), intern->document->len, &state)) {
164162
Z_ADDREF_P(state.zchild);
165163
add_assoc_zval_ex(&retval, ZEND_STRS("scope"), state.zchild);
166164
} else {

src/MongoDB/ReadPreference.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ PHP_METHOD(ReadPreference, getTagSets)
131131
state.map.root_type = PHONGO_TYPEMAP_NATIVE_ARRAY;
132132
state.map.document_type = PHONGO_TYPEMAP_NATIVE_ARRAY;
133133

134-
MAKE_STD_ZVAL(state.zchild);
135-
bson_to_zval(bson_get_data(&intern->read_preference->tags), intern->read_preference->tags.len, &state);
134+
bson_to_zval_ex(bson_get_data(&intern->read_preference->tags), intern->read_preference->tags.len, &state);
136135
RETURN_ZVAL(state.zchild, 0, 1);
137136
} else {
138137
RETURN_NULL();

0 commit comments

Comments
 (0)