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

AssetQuery height/width as string #3195

Closed
Anubarak opened this issue Aug 13, 2018 · 1 comment
Closed

AssetQuery height/width as string #3195

Anubarak opened this issue Aug 13, 2018 · 1 comment

Comments

@Anubarak
Copy link
Contributor

Anubarak commented Aug 13, 2018

Description

The docs and the source code states you are able to pass things like width('>= 500') as a parameter to the function https://github.com/craftcms/cms/blob/develop/src/elements/db/AssetQuery.php#L117.

But the function is

    public function width(int $value = null) // <-- the int will disallow strings thus `>=` is invalid
    {
        $this->width = $value;
        return $this;
    }

Steps to reproduce

  1. create an AssetQuery
  2. search for height/width values in range/larger/smaller than
  3. notice an exception >= 500 cant't be converted to integer
@brandonkelly
Copy link
Member

Thanks for pointing that out! Fixed for tomorrow’s release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants