Skip to content

whereIn Subquery Error - "vsprintf(): Too few arguments" #387

@joeyrush

Description

@joeyrush

Describe the bug
I'm experiencing a consistent error when using a subquery inside of a whereIn: vsprintf(): Too few arguments in CacheKey.php:255

Have tried stripping down to the absolute minimum reproducible and it seems to happen on the second where clause inside a whereIn subquery.

Eloquent Query

    TaxBand::query()
            ->whereIn('id', function ($query) {
                $query->select('abilities.entity_id')
                    ->from('abilities')
                    ->where('abilities.id', 1) // works fine up until here
                    ->where('abilities.name', 'manage'); // fails here
            })
            ->get();

Stack Trace
See: https://flareapp.io/share/VP636Qq7#F77

Environment

  • PHP: 7.4
  • OS: MacOS
  • Laravel: 8.13.0
  • Model Caching: 0.11.0 and 0.11.1

Additional context
Happy to provide anymore info, thank you!

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions