Differential D10392 Diff 25011 src/applications/herald/storage/transcript/HeraldObjectTranscript.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/storage/transcript/HeraldObjectTranscript.php
| Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | public function getFields() { | ||||
| return $this->fields; | return $this->fields; | ||||
| } | } | ||||
| private static function truncateValue($value, $length) { | private static function truncateValue($value, $length) { | ||||
| if (is_string($value)) { | if (is_string($value)) { | ||||
| if (strlen($value) <= $length) { | if (strlen($value) <= $length) { | ||||
| return $value; | return $value; | ||||
| } else { | } else { | ||||
| // NOTE: phutil_utf8_shorten() has huge runtime for giant strings. | // NOTE: PhutilUTF8StringTruncator has huge runtime for giant strings. | ||||
epriestley: Missing "PhutilUTF8StringTruncator has"? | |||||
| return phutil_utf8ize(substr($value, 0, $length)."\n<...>"); | return phutil_utf8ize(substr($value, 0, $length)."\n<...>"); | ||||
| } | } | ||||
| } else if (is_array($value)) { | } else if (is_array($value)) { | ||||
| foreach ($value as $key => $v) { | foreach ($value as $key => $v) { | ||||
| if ($length <= 0) { | if ($length <= 0) { | ||||
| $value['<...>'] = '<...>'; | $value['<...>'] = '<...>'; | ||||
| unset($value[$key]); | unset($value[$key]); | ||||
| } else { | } else { | ||||
| Show All 12 Lines | |||||
Missing "PhutilUTF8StringTruncator has"?