Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14412123
D20562.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
814 B
Referenced Files
None
Subscribers
None
D20562.diff
View Options
diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
--- a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
+++ b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
@@ -127,7 +127,19 @@
}
public function hasComment() {
- return $this->getComment() && strlen($this->getComment()->getContent());
+ if (!$this->getComment()) {
+ return false;
+ }
+
+ $content = $this->getComment()->getContent();
+
+ // If the content is empty or consists of only whitespace, don't count
+ // this as comment.
+ if (!strlen(trim($content))) {
+ return false;
+ }
+
+ return true;
}
public function getComment() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 25, 12:36 PM (10 h, 54 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6926273
Default Alt Text
D20562.diff (814 B)
Attached To
Mode
D20562: Require valid comments to contain at least one non-whitespace character
Attached
Detach File
Event Timeline
Log In to Comment