Skip to content

PHPC-1006: Do not modify Persistable::bsonSerialize() retval #643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2017

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Sep 5, 2017

@jmikola jmikola requested a review from bjori September 5, 2017 20:28
@@ -556,6 +566,10 @@ void php_phongo_zval_to_bson(zval *data, php_phongo_bson_flags_t flags, bson_t *
goto cleanup;
}

if (skip_odm_field && !strcmp(string_key, PHONGO_ODM_FIELD_NAME)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its confusing that string_key is both a char* and a zend_string.
but that might just be the context given github, which was very badly broken :|

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diff line is for the PHP 5.x block, where string_key is the char* populated by zend_hash_get_current_key_ex(). In the preceding PHP 7.x block, ZEND_HASH_FOREACH_KEY_VAL() assigns the zend_string.

@bjori
Copy link
Contributor

bjori commented Sep 5, 2017

I've no idea why this is failing on Travis but this lgtm

@jmikola
Copy link
Member Author

jmikola commented Sep 6, 2017

I've no idea why this is failing on Travis but this lgtm

Fixed in #644

@jmikola jmikola merged commit a8a639b into mongodb:master Sep 6, 2017
jmikola added a commit that referenced this pull request Sep 6, 2017
@jmikola jmikola deleted the phpc-1006 branch September 6, 2017 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants