a couple problems
authordemeritcowboy <demeritcowboy@hotmail.com>
Tue, 27 Oct 2020 19:11:02 +0000 (15:11 -0400)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Mon, 2 Nov 2020 23:50:13 +0000 (18:50 -0500)
CRM/Core/DAO.php

index dad318f0c0e09d229e1cfe922adb3cf49c5a0038..13c0c8c65a4654998c4b79ca4bca3e006d3d8709 100644 (file)
@@ -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;