Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not log if no valid sources are found in backtrace #92

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

scottzirkel
Copy link
Contributor

This PR attempts to fix #91. When the backtrace results are filtered through findSource, they can return an empty array.

Currently if the array is empty, an error is thrown as the zero key in $sources is not found.

This checks to see if the array is empty, if so, it simply returns from the log.

This PR may be a bit naïve in that I am not able to determine which use cases the backtrace is returning empty. There may be a deeper issue at play, however this returns before the error and allows the app to continue to function.

I also do not have a good way to test this, so if someone would like to add a test, feel free.

Return if no sources are found.
@scottzirkel scottzirkel mentioned this pull request Mar 3, 2023
@michal3377
Copy link

@mpociot Any chances for merging this PR? This is a simple fix for a bug that can cause random crashes in dev environments.

@YunshuaiPeng
Copy link

Can you merge this PR? It is very important for me. Thanks.

@ktross
Copy link

ktross commented Apr 24, 2023

@mpociot @sschlein @mechelon If anyone is able to merge this, it would be greatly appreciated!

@HugoHeneault
Copy link

Any update about merging this? Thanks :)

@mechelon
Copy link
Member

Thank you!

@mechelon mechelon merged commit a24ced7 into beyondcode:master Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ErrorException QueryDetector.php:78
9 participants