query-monitor icon indicating copy to clipboard operation
query-monitor copied to clipboard

Fix notice if caller isnt an array

Open kkmuffme opened this issue 4 years ago • 1 comments

kkmuffme avatar Apr 16 '21 11:04 kkmuffme

Thanks for the PR! Do you have some info about how to reproduce this problem please?

johnbillion avatar Apr 16 '21 20:04 johnbillion

Not exactly after 1.5 years. From what I can see in the code it happens if reset() in get_caller() returns false - and reset() returns false if the array is empty. The trace array is empty when the backtrace is empty.

When is the backtrace empty? e.g. when we are inside of a callback of a register_shutdown_function I wouldn't have PRed this if that wasn't a common enough notice/issue back then though.

kkmuffme avatar Aug 25 '22 22:08 kkmuffme