From c6447b088ce1efd8f585189f0a69d2d41356fc9c Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Tue, 27 Oct 2020 15:11:02 -0400 Subject: [PATCH] a couple problems --- CRM/Core/DAO.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index dad318f0c0..13c0c8c65a 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -758,8 +758,9 @@ class CRM_Core_DAO extends DB_DataObject { else { $maxLength = $field['maxlength'] ?? NULL; if (!is_array($value) && $maxLength && mb_strlen($value) > $maxLength && empty($field['pseudoconstant'])) { - Civi::log()->warning(ts('A string for field $dbName has been truncated. The original string was %1', [CRM_Utils_Type::escape($value, 'String')])); - // The string is too long - what to do what to do? Well losing data is generally bad so lets' truncate + // No ts() since this is a sysadmin-y string not seen by general users. + Civi::log()->warning('A string for field {dbName} has been truncated. The original string was {value}.', ['dbName' => $dbName, 'value' => $value]); + // The string is too long - what to do what to do? Well losing data is generally bad so let's truncate $value = CRM_Utils_String::ellipsify($value, $maxLength); } $this->$dbName = $value; -- 2.25.1