Comments (9)
I do expect postcode to be a number :)
(I do use number to be able to search from/to postcodes)
There was cases of whitespace included in value, customers who had written postcode in city and vice versa, in customer profile address (my fault).
But that isn't my point with this issue.
To my knowledge, the only reason to multiply the value with 1, is to make sure a string is converted to a number?
So i believe that either it should expect a number or convert in a better way, or handle an exception?
from magento-lts.
There are many places that can throw
TypeError: Unsupported operand types: string * int :
that need to be fixed as well.
app\code\core\Mage\Adminhtml\Block](
from magento-lts.
If your postcode is not a number, why do you set 'type' => 'number'
?
from magento-lts.
Can you do a PR?
from magento-lts.
Can you do a PR?
Yeah, I'll have a go at it and submit a PR :)
Ref:
https://github.com/search?q=repo%3AOpenMage%2Fmagento-lts+%22+*+1%3B%22&type=code
https://github.com/search?q=repo%3AOpenMage%2Fmagento-lts+%22+*+1+%22&type=code
from magento-lts.
Please do not change.
You can add a custom column renderer, observe _before_save or _after_load, validate input ... no need to change core for some wrong input.
from magento-lts.
I don't want to change core due to wrong input - i found the odd number conversion code due to wrong input handling.
If the mentioned core code is not an issue, i'll just close it.
from magento-lts.
You can try: https://onlinephp.io?s=s7EvyCjg5VIpLilSsFVQN1S35uUqSyyKTynNLdAAi2orGGhaAwA%2C&v=8.2.12
$number = '1' * 1; // int(1)
$number = '1.01' * 1; // float(1.01)
$number = 'str' * 1; // Fatal error: Uncaught TypeError: Unsupported operand types: string * int
Is it wrong to throw the last error? It depends on the use case. For
In the core, the above code is used for column of type int
as defined in the DB. So it's probably ok to throw an error, I think. So I changed the label to "bug unconfirmed".
from magento-lts.
Sounds right.
I'll close it up.
from magento-lts.
Related Issues (20)
- Quote product prices rounding issues when catalog prices include taxes
- Upload gif image on backend system Configuration Issue HOT 2
- support smtp servers out of the box HOT 12
- In backend, add "click to copy text" feature HOT 1
- SOAP fault due to "SOAP-ERROR: Parsing Schema: can't import schema from 'http://schemas.xmlsoap.org/soap/encoding/' " HOT 25
- SOAP API: SOAP-ERROR: Parsing Schema: unexpected <complextype> in schema HOT 4
- Shopping Cart Price rule - Free Shipping weight condition
- feature request: Event for configuration actions (save/delete) on path HOT 2
- Admin filters and sorting not working after upgrader to v20.6.0 and v20.7.0 HOT 1
- Edit attributes broken? HOT 4
- Black background of PNG images with transparent background in the Wysiwyg editor HOT 11
- Skipped Zend_Validate_Barcode_Intelligentmail from autoloading HOT 1
- Improving the file name generation logic for JS and CSS files HOT 7
- After upgrade to v20.7.0 I got some alert on Admin Login HOT 16
- Fatal error after upgrading from 20.1.1 to 20.8 when clearing cache from Admin Page HOT 2
- Error when saving product with image without description HOT 6
- Problem with Configurable Swatches after PR #3686 HOT 1
- Unable to Override GroupController in OpenMage HOT 2
- N98-magerun tests fails since #2993 HOT 2
- Current category cache issue in navigation block
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magento-lts.