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

TypeError: Unsupported operand types: int * string #3135

Closed
m-overlund opened this issue Apr 3, 2023 · 8 comments · Fixed by #3136
Closed

TypeError: Unsupported operand types: int * string #3135

m-overlund opened this issue Apr 3, 2023 · 8 comments · Fixed by #3136
Labels
bug confirmed PHP 8.1 Related to PHP 8.1

Comments

@m-overlund
Copy link
Contributor

You can crash the admin product page, by filtering for Price from: NULL to: NULL

TypeError: Unsupported operand types: int * string
https://bmb-import.sentry.io/share/issue/7fb970b852054849b8f142c3baeaecdb/

PHP 8.1
OpenMage 19.4.23

(Happens with and without TBT_EnhancedGrid)

Preconditions (*)

Steps to reproduce (*)

Expected result (*)

  1. [Screenshots, logs or description]

Actual result (*)

  1. [Screenshots, logs or description]
@fballiano
Copy link
Contributor

would it be possible to test with the latest github version?

@m-overlund
Copy link
Contributor Author

i don't have the greatest dev setup atm. - but will try to prioritize this :)

@elidrissidev
Copy link
Member

Filtering by NULL is a new feature added by #1203, and I don't think it supports custom column filter classes.

@sreichel
Copy link
Contributor

sreichel commented Apr 3, 2023

@elidrissidev it happens for all strings - not only null.

@elidrissidev
Copy link
Member

Yeah but it wouldn't make sense to filter by a string in a Price column...

@sreichel sreichel changed the title _TypeError: Unsupported operand types: int * string_ - PHP 8.1 _TypeError: Unsupported operand types: int * string_ Apr 4, 2023
@sreichel sreichel changed the title _TypeError: Unsupported operand types: int * string_ TypeError: Unsupported operand types: int * string Apr 5, 2023
@addison74
Copy link
Contributor

addison74 commented Apr 8, 2023

From an engineering point of view, filtering by any value, other than numerical, must be avoided. As it is now in Backend the error appears and I get the popup with the animated loader and "Please wait..." message. If I refresh the page, all the content under the navigation menu disappears. I have to end the session and login again. Obviously such a situation must be prevented and we should not rely on the honesty of the user to use only numerical/dates values when filtering the grid columns.

@sreichel sreichel added the PHP 8.1 Related to PHP 8.1 label Feb 4, 2025
@sreichel
Copy link
Contributor

sreichel commented Feb 4, 2025

@all-contributors add @m-overlund bug

Copy link
Contributor

@sreichel

I've put up a pull request to add @m-overlund! 🎉

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

Successfully merging a pull request may close this issue.

5 participants