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

Update html.formmargin.class.php #33011

Merged
merged 2 commits into from
Feb 10, 2025
Merged

Update html.formmargin.class.php #33011

merged 2 commits into from
Feb 10, 2025

Conversation

homer8173
Copy link
Contributor

Under PHP 8 , can't add string and float on following lines. So i propose to convert to avoid errors

But i don't understand why database double(24,8) are fetched as string

Under PHP 8 , can't add string and float on following lines. So i propose to convert to avoid errors
@eldy
Copy link
Member

eldy commented Feb 10, 2025

Under PHP 8 , can't add string and float on following lines. So i propose to convert to avoid errors

But i don't understand why database double(24,8) are fetched as string

Data are retreived doing SQL request. A SQL request is a full text protocol. Question is full text and answer is full text. So all is text, even dates. This is goal of the requester to then convert them into the correct type (for example with db->jdate() for date or casting to int or float for numeric. However sometime the developer did not add this into the code after its fetch and format in memory is still text instead of numeric or date...

@eldy eldy merged commit fe43393 into Dolibarr:develop Feb 10, 2025
3 of 4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants