Skip to content

\DebugBar\DataFormatter\QueryFormatter::quoteBinding() unable to handle a resource as binding #2029

@aedart

Description

@aedart

In situations, when you dealing with resource as binding, the quoteBinding() will fail because it always expects a string as $binding.
In my case, I store small files in the database, meaning that bindings contain resources, rather than strings.

Version: v4.2.6

Possible Solution

The quoteBinding() could perhaps be changed to accept and deal with resources. However, I'm not sure if the entire chain before invoking quoteBinding() should be refactored to deal with resources accordingly.

Similar issue in Laravel

I once encountered a similar issue in Laravel. Back then, I made the following pull request was made and merged into the framework: laravel/framework#53100

Sadly, I'm too unfamiliar with "DebugBar" code to be able to offer the same (at least for the moment).

Work-around

Thus far, the only way to avoid this is to disable debugbar (as far as I can see).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions