Make call_uer_func_array() populate regular values to references, if possible#2085
Make call_uer_func_array() populate regular values to references, if possible#2085dstogov wants to merge 4 commits intophp:masterfrom
Conversation
…ossible. Fixed bug #72598 (Reference is lost after array_slice()).
|
What about call_user_func_array() not going through SEND_ARRAY (e.g. in namespace)? I think this code doesn't handle it yet. |
|
Regular call_user_func_array() is changed in the same way. |
|
Ah, sorry, I missed part of the patch. However, I don't think those implementations do the same thing wrt how the argument is fetched. E.g. |
|
You are right. Probably it's not very hard to fix this (using _W mode for IS_VAR/IS_CV arrays). What do you think about this solution in general. |
|
The changes to the tests are quite what I expect. Travis reports a segfault for these tests though... @nikic Right, but it will throw a type error or at least emit a warning+zpp failure for undefined instead here? [but yeah, should never emit a notice then] |
|
All mentioned problems should be fixed now. |
|
@dstogov About this approach in general, I'm not totally sure. One the one hand, this is a "pragmatic" solution, in that it usually will do what you want. However, this will probably introduce a few gotchas. For example, it is very common that the arguments passed to call_user_func_array() actually come from somewhere else, e.g. Currently, if |
|
In any case, I don't have a strong opinion either way. I think it may be good to discuss what to do here on the mailing list, as this is a larger issue. |
|
Closed in favor to #2088 |
Fixed bug #72598 (Reference is lost after array_slice()).