Skip to content

[4.x]: Asset Query’s folderPath does not accept arrays #16981

@rungta

Description

@rungta

The folderPath parameter in Asset element queries does not appear to accept an array as the criteria, even though the documentation shows a list of folder paths as a supported value.

Steps to reproduce

\craft\elements\Asset::find()->folderPath(['foo/*']);

Actual behavior

TypeError  Cannot assign array to property craft\elements\db\AssetQuery::$folderPath of type ?string.

Craft CMS version

4.11.5

PHP version

8.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions