-
Notifications
You must be signed in to change notification settings - Fork 53
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
floats are truncated (casted in integer) with andCondition function #125
Comments
Could you show the relevant portion of your schema? What locale does your server use? |
Hi Mark For the "locale" part, I'm not sure what the server uses... I let everything by default in modx Here my schema:
|
Having the exact same issue using xPDO included with MODX 3.01 , where parsing a schema to create Model files:
I get dozens of lines of these errors on two geo-location fields:
|
The issue was initially written in Modx Revolution modxcms/revolution#13657 (comment)
Summary
Using floats in a 'andCondition' call would transform them as integer
Step to reproduce
create an XPDO query calling andCondtion as this following exemple
Observed behavior
result is like this one :
Expected behavior
Suggestion for solving the problem
Perhaps I missed something but...
The problem was detected in the parseBindings function using the 'quote' function... called line 2670 --2704 in modx revo 2.5.8-- in core/xpdo/xpdo.class.php
Whatever type (int, float, ...) , you call 'quote'...
The problem sounds to be solved by changing line 2534 --2560 in modx revo-- in core/xpdo/xpdo.class.php in function quote
Actually, it seems like float are seen like "param_int" (versus param_str) all along the processing...
so it should not be cast here as values in float could arrive here...
The text was updated successfully, but these errors were encountered: