MySQL error when changing email for user #10433
Labels
Area: Emails
Issues & PRs related to all things regarding emails & email module
Priority:Important
Issues & PRs that are important; broken functions, errors - there are workarounds
Severity: Major
Significant impact/severe disruption
Status:Fix Proposed
A issue that has a PR related to it that provides a possible resolution
Type: Bug
Bugs within the core SuiteCRM codebase
Issue
While changing an email address for a user within admin I noticed an error within the log.
While my environment is suitecrm 8, the issue is within the legacy files.
LOG FILE:
[FATAL] Query Failed: UPDATE email_addresses SET email_address = '[email protected]', email_address_caps = '[email protected]' WHERE id = ''bee3d040-8f84-31e0-787d-634e8a7ee022'' AND deleted = 0: MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'bee3d040-8f84-31e0-787d-634e8a7ee022'' AND deleted = 0' at line 6
Possible Fix
The issue is: https://github.com/salesagility/SuiteCRM/blob/hotfix/include/SugarEmailAddress/SugarEmailAddress.php#L469
The id is being double quoted.
Steps to Reproduce the Issue
Context
No response
Version
8.6.0
What browser are you currently using?
Other
Browser Version
No response
Environment Information
PHP 8.1
Operating System and Version
ubuntu 22.04
The text was updated successfully, but these errors were encountered: