projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9ee6a5
)
CRM-19335
author
tschuettler
<tschuettler@oxfam.de>
Fri, 9 Sep 2016 11:51:17 +0000
(13:51 +0200)
committer
GitHub
<noreply@github.com>
Fri, 9 Sep 2016 11:51:17 +0000
(13:51 +0200)
This creates a multibyte aware substring.
Since we are using MySQL >= 5 we could also use mb_substr($params['bounce_reason'], 0, 255) to fully use that varchar(255).
CRM/Mailing/Event/BAO/Bounce.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Mailing/Event/BAO/Bounce.php
b/CRM/Mailing/Event/BAO/Bounce.php
index fc050f48ce88c3e93596cdc9fd7ab6f81e27a7c7..d0e005a3c07317d6dc69f4cb2bec96532b6e2549 100644
(file)
--- a/
CRM/Mailing/Event/BAO/Bounce.php
+++ b/
CRM/Mailing/Event/BAO/Bounce.php
@@
-75,7
+75,7
@@
class CRM_Mailing_Event_BAO_Bounce extends CRM_Mailing_Event_DAO_Bounce {
}
// CRM-11989
- $params['bounce_reason'] =
substr
($params['bounce_reason'], 0, 254);
+ $params['bounce_reason'] =
mb_strcut
($params['bounce_reason'], 0, 254);
$bounce->copyValues($params);
$bounce->save();