Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2680790
D25699.1734624264.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
951 B
Referenced Files
None
Subscribers
None
D25699.1734624264.diff
View Options
diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php
--- a/src/applications/transactions/editengine/PhabricatorEditEngine.php
+++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php
@@ -1920,7 +1920,7 @@
$comment_text = $request->getStr('comment');
$comment_metadata = $request->getStr('comment_metadata');
- if (strlen($comment_metadata)) {
+ if (phutil_nonempty_string($comment_metadata)) {
$comment_metadata = phutil_json_decode($comment_metadata);
}
@@ -2020,7 +2020,7 @@
$xactions[] = $xaction;
}
- if (strlen($comment_text) || !$xactions) {
+ if (phutil_nonempty_string($comment_text) || !$xactions) {
$xactions[] = id(clone $template)
->setTransactionType(PhabricatorTransactions::TYPE_COMMENT)
->setMetadataValue('remarkup.control', $comment_metadata)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 16:04 (2 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1015155
Default Alt Text
D25699.1734624264.diff (951 B)
Attached To
Mode
D25699: Fix PHP 8.1 "strlen(null)" exceptions handling empty comment metadata in PhabricatorEditEngine
Attached
Detach File
Event Timeline
Log In to Comment