Advertisement
Guest User

Untitled

a guest
Apr 12th, 2016
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. diff --git a/Zend/zend.h b/Zend/zend.h
  2. index e886ba2..8c3c81e 100644
  3. --- a/Zend/zend.h
  4. +++ b/Zend/zend.h
  5. @@ -331,6 +331,7 @@ ZEND_API void zend_restore_error_handling(zend_error_handling *saved);
  6.  
  7. #define DEBUG_BACKTRACE_PROVIDE_OBJECT (1<<0)
  8. #define DEBUG_BACKTRACE_IGNORE_ARGS (1<<1)
  9. +#define DEBUG_BACKTRACE_PROVIDE_CALLED (1<<2)
  10.  
  11. #include "zend_object_handlers.h"
  12. #include "zend_operators.h"
  13. diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
  14. index 0cbafc7..5eb6d29 100644
  15. --- a/Zend/zend_builtin_functions.c
  16. +++ b/Zend/zend_builtin_functions.c
  17. @@ -2672,9 +2672,11 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
  18. if (object) {
  19. if (func->common.scope) {
  20. add_assoc_str_ex(&stack_frame, "class", sizeof("class")-1, zend_string_copy(func->common.scope->name));
  21. + if ((options & DEBUG_BACKTRACE_PROVIDE_CALLED) != 0) {
  22. + add_assoc_str_ex(&stack_frame, "called", sizeof("called")-1, zend_string_copy(object->ce->name));
  23. + }
  24. } else {
  25. add_assoc_str_ex(&stack_frame, "class", sizeof("class")-1, zend_string_copy(object->ce->name));
  26. -
  27. }
  28. if ((options & DEBUG_BACKTRACE_PROVIDE_OBJECT) != 0) {
  29. zval zv;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement