Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14077449
D21758.id51868.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
413 B
Referenced Files
None
Subscribers
None
D21758.id51868.diff
View Options
diff --git a/src/utils/utf8.php b/src/utils/utf8.php
--- a/src/utils/utf8.php
+++ b/src/utils/utf8.php
@@ -314,6 +314,8 @@
* @return int The console display length of the string.
*/
function phutil_utf8_console_strlen($string) {
+ $string = phutil_string_cast($string);
+
// Formatting and colors don't contribute any width in the console.
$string = preg_replace("/\x1B\[\d*m/", '', $string);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 11:30 PM (6 h, 22 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6776286
Default Alt Text
D21758.id51868.diff (413 B)
Attached To
Mode
D21758: Fix a PHP 8.1 issue with "phutil_console_strlen()"
Attached
Detach File
Event Timeline
Log In to Comment