Closed jasonvarga closed 7 months ago
Visiting /* will throw an exception.
/*
The error comes from line 46 here:
Statamic\Eloquent\Taxonomies\Taxonomy::fromModel(): Argument #1 ($model) must be of type Illuminate\Database\Eloquent\Model, array given
https://github.com/statamic/eloquent-driver/blob/a67cb95d599fcb35e13e15cb20c6243b2eb71222/src/Taxonomies/TaxonomyRepository.php#L40-L47
This is because when you provide a key ending with * to Blink, it returns an array of values.
*
$blink->get('key'); // Returns 'value' $blink->get('prefix*'); // Returns an array of values whose keys start with 'prefix'
Maybe line 46 should be changed to
return $taxonomyModel instanceof Model ? ...
Visiting
/*
will throw an exception.The error comes from line 46 here:
https://github.com/statamic/eloquent-driver/blob/a67cb95d599fcb35e13e15cb20c6243b2eb71222/src/Taxonomies/TaxonomyRepository.php#L40-L47
This is because when you provide a key ending with
*
to Blink, it returns an array of values.Maybe line 46 should be changed to