Closed adambaratz closed 8 years ago
@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.
See #27 for test.
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 2b92410bb7743b01e2796529ddc77a2b0eb09607 isn't necessary, but since mustache_data_from_zval() is called in other contexts, it feels safer to leave it in place.