Napp / xray-laravel

AWS X-Ray tracing for Laravel apps
MIT License
56 stars 34 forks source link

str_replace() error when using query param bindings #24

Closed reganjohnson closed 1 year ago

reganjohnson commented 2 years ago

TypeError str_replace(): Argument #3 ($subject) must be of type array|string, null given

/vendor/napp/xray-laravel/src/Collectors/DatabaseQueryCollector.php in str_replace at line 53

capture-2022-03-23-105538

Disabling query bindings a quick workaround it seems.

Gavrisimo commented 1 year ago

The issue seems to be caused by queries without any bindings at all, so I guess the fix should be pretty simple.

Gavrisimo commented 1 year ago

Maybe something like this? https://github.com/Napp/xray-laravel/pull/28