Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 1.7
-
Fix Version/s: 1.7
-
Component/s: Core CiviCRM
-
Labels:None
Description
If in the drupal user database there is a user with the email containing an _ and another user with the same email but the _ character (example: foo_bar@foobar.org and foo.bar@foobar.org) the second user syncronization fails with this error:
error
crm_core_error Object
(
[_errors] => Array
(
[0] => Array
(
[code] => 8000
[params] => Array
(
[0] => 708
)
[package] => CRM
[level] => Fatal
[time] => 1174923568.85
[context] => Array
(
[file] => /home/httpd/civicrm.catnic.it/html/modules/civicrm/CRM/Core/Error.php
[line] => 492
[function] => createerror
[class] => crm_core_error
)
[message] => Found matching contacts: 708
)
)
[_errorsByLevel] => Array
(
[Fatal] => Array
(
[0] => Array
(
[code] => 8000
[params] => Array
(
[0] => 708
)
[package] => CRM
[level] => Fatal
[time] => 1174923568.85
[context] => Array
(
[file] => /home/httpd/civicrm.catnic.it/html/modules/civicrm/CRM/Core/Error.php
[line] => 492
[function] => createerror
[class] => crm_core_error
)
[message] => Found matching contacts: 708
)
)
)
[_package] => CRM
[_compat] =>
[_msgCallback] => Array
(
[0] => crm_core_error Object
(
[_errors] => Array
(
[0] => Array
(
[code] => 8000
[params] => Array
(
[0] => 708
)
[package] => CRM
[level] => Fatal
[time] => 1174923568.85
[context] => Array
(
[file] => /home/httpd/civicrm.catnic.it/html/modules/civicrm/CRM/Core/Error.php
[line] => 492
[function] => createerror
[class] => crm_core_error
)
[message] => Found matching contacts: 708
)
)
[_errorsByLevel] => Array
(
[Fatal] => Array
(
[0] => Array
(
[code] => 8000
[params] => Array
(
[0] => 708
)
[package] => CRM
[level] => Fatal
[time] => 1174923568.85
[context] => Array
(
[file] => /home/httpd/civicrm.catnic.it/html/modules/civicrm/CRM/Core/Error.php
[line] => 492
[function] => createerror
[class] => crm_core_error
)
[message] => Found matching contacts: 708
)
)
)
[_package] => CRM
[_compat] =>
[_msgCallback] => Array
RECURSION
[_contextCallback] => Array
(
[0] => RECURSION
[1] => getFileLine
)
[_errorCallback] => Array
(
)
[_logger] => log_display Object
(
[_opened] =>
[_id] => 8d0a7a3568831fbbc8906cbe72ae86e1
[_ident] =>
[_priority] => 6
[_mask] => 255
[_listeners] => Array
(
)
[_formatMap] => Array
(
[%
[%{ident}] => %2$s
[%{priority}] => %3$s
[%{message}] => %4$s
[%{file}] => %5$s
[%{line}] => %6$s
[%{function}] => %7$s
[%\{] => %%{
)
[_error_prepend] =>
[_error_append] =>
[_linebreak] => <br />
)
[_errorMsgs] => Array
(
)
)
[1] => getErrorMessage
)
[_contextCallback] => Array
(
[0] => crm_core_error Object
(
[_errors] => Array
(
[0] => Array
(
[code] => 8000
[params] => Array
(
[0] => 708
)
[package] => CRM
[level] => Fatal
[time] => 1174923568.85
[context] => Array
(
[file] => /home/httpd/civicrm.catnic.it/html/modules/civicrm/CRM/Core/Error.php
[line] => 492
[function] => createerror
[class] => crm_core_error
)
[message] => Found matching contacts: 708
)
)
[_errorsByLevel] => Array
(
[Fatal] => Array
(
[0] => Array
(
[code] => 8000
[params] => Array
(
[0] => 708
)
[package] => CRM
[level] => Fatal
[time] => 1174923568.85
[context] => Array
(
[file] => /home/httpd/civicrm.catnic.it/html/modules/civicrm/CRM/Core/Error.php
[line] => 492
[function] => createerror
[class] => crm_core_error
)
[message] => Found matching contacts: 708
)
)
)
[_package] => CRM
[_compat] =>
[_msgCallback] => Array
(
[0] => RECURSION
[1] => getErrorMessage
)
[_contextCallback] => Array
RECURSION
[_errorCallback] => Array
(
)
[_logger] => log_display Object
(
[_opened] =>
[_id] => 8d0a7a3568831fbbc8906cbe72ae86e1
[_ident] =>
[_priority] => 6
[_mask] => 255
[_listeners] => Array
(
)
[_formatMap] => Array
(
[%{timestamp}
] => %1$s
[%
[%{priority}] => %3$s
[%{message}] => %4$s
[%{file}] => %5$s
[%{line}] => %6$s
[%{function}] => %7$s
[%\{] => %%{
)
[_error_prepend] =>
[_error_append] =>
[_linebreak] => <br />
)
[_errorMsgs] => Array
(
)
)
[1] => getFileLine
)
[_errorCallback] => Array
(
)
[_logger] => log_display Object
(
[_opened] =>
[_id] => 8d0a7a3568831fbbc8906cbe72ae86e1
[_ident] =>
[_priority] => 6
[_mask] => 255
[_listeners] => Array
(
)
[_formatMap] => Array
(
[%{timestamp}] => %1$s
[%{ident}
] => %2$s
[%
] => %3$s
[%
] => %4$s
[%
] => %5$s
[%
] => %6$s
[%
] => %7$s
[%\{] => %%{
)
[_error_prepend] =>
[_error_append] =>
[_linebreak] => <br />
)
[_errorMsgs] => Array
(
)
)
the problem is that the function getWhereClause() confronts emails without considering that _ is a special character for MySQL.
( LOWER(civicrm_email.email) LIKE 'foo_bar@foobar.org%' )
verified in version 1.7.beta.9019 Drupal PHP4