Skip to content
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

Use macro that will automatically get value of indirect zvals #26

Merged
merged 1 commit into from
Apr 19, 2016

Conversation

adambaratz
Copy link
Contributor

I ran into a situation where a hash could have a zval that indirectly refers to an zval of type IS_UNDEF. The foreach macro knows to skip undefined zvals, but it won't skip them if it only sees the IS_INDIRECT zval. This macro pulls out the value that matters here. This potentially means that 2b92410 isn't necessary, but since mustache_data_from_zval() is called in other contexts, it feels safer to leave it in place.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.08%) to 80.806% when pulling 62256e2 on wayfair:indirect into 65b0eb0 on jbboehr:master.

@jbboehr jbboehr added this to the v0.7.2 milestone Apr 19, 2016
@jbboehr jbboehr added the bug label Apr 19, 2016
@jbboehr jbboehr merged commit c78c45c into jbboehr:master Apr 19, 2016
@jbboehr
Copy link
Owner

jbboehr commented Apr 20, 2016

@adambaratz I'm a bit curious: do you know where the indirect zvals are coming from? I've never run into one myself during extension development, and I'm concerned my other code may not take them into account. It would be nice to have unit tests covering these cases as well.

@adambaratz
Copy link
Contributor Author

See #27 for test.

@adambaratz adambaratz deleted the indirect branch April 20, 2016 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants