Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rungta opened this issue Mar 28, 2025 · 2 comments
Open

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

rungta opened this issue Mar 28, 2025 · 2 comments

Comments

@rungta
Copy link

rungta commented Mar 28, 2025

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

@brandonkelly
Copy link
Member

Thanks for reporting that! Fixed for the next Craft 4 and 5 releases.

@brandonkelly
Copy link
Member

Craft 4.14.12 and 5.6.14 are out with that fix. Thanks again!

@brandonkelly brandonkelly reopened this Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants