Page MenuHomePhabricator

D11219.diff
No OneTemporary

D11219.diff

diff --git a/src/applications/conduit/method/ConduitConnectConduitAPIMethod.php b/src/applications/conduit/method/ConduitConnectConduitAPIMethod.php
--- a/src/applications/conduit/method/ConduitConnectConduitAPIMethod.php
+++ b/src/applications/conduit/method/ConduitConnectConduitAPIMethod.php
@@ -60,7 +60,7 @@
$client_version = (int)$request->getValue('clientVersion');
$client_description = (string)$request->getValue('clientDescription');
$client_description = id(new PhutilUTF8StringTruncator())
- ->setMaximumCodepoints(255)
+ ->setMaximumBytes(255)
->truncateString($client_description);
$username = (string)$request->getValue('user');
diff --git a/src/applications/differential/parser/DifferentialCommitMessageParser.php b/src/applications/differential/parser/DifferentialCommitMessageParser.php
--- a/src/applications/differential/parser/DifferentialCommitMessageParser.php
+++ b/src/applications/differential/parser/DifferentialCommitMessageParser.php
@@ -142,7 +142,7 @@
$terminal = '...';
$title = $fields[$key_title];
$short = id(new PhutilUTF8StringTruncator())
- ->setMaximumGlyphs(250)
+ ->setMaximumBytes(250)
->setTerminator($terminal)
->truncateString($title);
diff --git a/src/applications/harbormaster/storage/build/HarbormasterBuild.php b/src/applications/harbormaster/storage/build/HarbormasterBuild.php
--- a/src/applications/harbormaster/storage/build/HarbormasterBuild.php
+++ b/src/applications/harbormaster/storage/build/HarbormasterBuild.php
@@ -214,7 +214,7 @@
$log_type) {
$log_source = id(new PhutilUTF8StringTruncator())
- ->setMaximumCodepoints(250)
+ ->setMaximumBytes(250)
->truncateString($log_source);
$log = HarbormasterBuildLog::initializeNewBuildLog($build_target)
diff --git a/src/applications/phame/conduit/PhameCreatePostConduitAPIMethod.php b/src/applications/phame/conduit/PhameCreatePostConduitAPIMethod.php
--- a/src/applications/phame/conduit/PhameCreatePostConduitAPIMethod.php
+++ b/src/applications/phame/conduit/PhameCreatePostConduitAPIMethod.php
@@ -91,7 +91,7 @@
$phame_title = $request->getValue(
'phameTitle',
id(new PhutilUTF8StringTruncator())
- ->setMaximumCodepoints(64)
+ ->setMaximumBytes(64)
->truncateString($title));
$post->setPhameTitle(PhabricatorSlug::normalize($phame_title));
$post->setBody($body);
diff --git a/src/applications/repository/storage/PhabricatorRepositoryCommitData.php b/src/applications/repository/storage/PhabricatorRepositoryCommitData.php
--- a/src/applications/repository/storage/PhabricatorRepositoryCommitData.php
+++ b/src/applications/repository/storage/PhabricatorRepositoryCommitData.php
@@ -41,7 +41,7 @@
$summary = phutil_split_lines($message, $retain_endings = false);
$summary = head($summary);
$summary = id(new PhutilUTF8StringTruncator())
- ->setMaximumCodepoints(self::SUMMARY_MAX_LENGTH)
+ ->setMaximumBytes(self::SUMMARY_MAX_LENGTH)
->truncateString($summary);
return $summary;
diff --git a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
--- a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
+++ b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
@@ -18,7 +18,7 @@
}
$data->setCommitID($commit->getID());
$data->setAuthorName(id(new PhutilUTF8StringTruncator())
- ->setMaximumCodepoints(255)
+ ->setMaximumBytes(255)
->truncateString((string)$author));
$data->setCommitDetail('authorName', $ref->getAuthorName());

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 19, 4:09 AM (19 h, 7 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7017023
Default Alt Text
D11219.diff (3 KB)

Event Timeline