beyondcode/laravel-query-detector

debug_backtrace limit

vintagesucks opened this issue · 1 comments

Is there a special reason why the debug_backtrace() limit was set to 50?

$backtrace = collect(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 50));

I am in a situation where I am implementing recursive relationships and at a certain depth the following line throws an ErrorException (E_NOTICE) (Undefined offset: 0):

$key = md5($query->sql . $model . $relationName . $sources[0]->name . $sources[0]->line);

Increasing the debug_backtrace() limit makes the notice disappear (at least to a certain depth). Would it be possible to make the limit configurable/disableable or is there a better approach that I don't see right now?

Thank you.

Thank You
Issue is fixed by increase the debug_backtrace limit