Advertisement
Guest User

bug60140

a guest
Oct 27th, 2011
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. Index: trunk/ext/reflection/php_reflection.c
  2. ===================================================================
  3. --- trunk/ext/reflection/php_reflection.c (revision 318478)
  4. +++ trunk/ext/reflection/php_reflection.c (working copy)
  5. @@ -50,6 +50,15 @@
  6. zval_ptr_dtor(&member); \
  7. } while (0)
  8.  
  9. +#define reflection_fix_reference(fptr, args_num, params) do { \
  10. + uint i = 0; \
  11. + for(;i<args_num;i++) { \
  12. + if (ARG_SHOULD_BE_SENT_BY_REF(fptr, i+1)) { \
  13. + Z_SET_ISREF_P(*(params[i])); \
  14. + } \
  15. + } \
  16. + } while (0)
  17. +
  18. /* Class entry pointers */
  19. PHPAPI zend_class_entry *reflector_ptr;
  20. PHPAPI zend_class_entry *reflection_exception_ptr;
  21. @@ -1879,6 +1888,8 @@
  22. fcc.calling_scope = EG(scope);
  23. fcc.called_scope = NULL;
  24. fcc.object_ptr = NULL;
  25. +
  26. + reflection_fix_reference(fptr, num_args, params);
  27.  
  28. result = zend_call_function(&fci, &fcc TSRMLS_CC);
  29.  
  30. @@ -2812,6 +2823,8 @@
  31. fcc.called_scope = obj_ce;
  32. fcc.object_ptr = object_ptr;
  33.  
  34. + reflection_fix_reference(mptr, fci.param_count, fci.params);
  35. +
  36. result = zend_call_function(&fci, &fcc TSRMLS_CC);
  37.  
  38. if (params) {
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement