Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2895032
D25281.1737233455.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
1 KB
Referenced Files
None
Subscribers
None
D25281.1737233455.diff
View Options
diff --git a/src/applications/pholio/controller/PholioInlineController.php b/src/applications/pholio/controller/PholioInlineController.php
--- a/src/applications/pholio/controller/PholioInlineController.php
+++ b/src/applications/pholio/controller/PholioInlineController.php
@@ -102,6 +102,7 @@
->addCancelButton($mock_uri, pht('Close'));
}
+ $error = null;
if ($request->isFormPost()) {
$v_content = $request->getStr('content');
@@ -112,9 +113,13 @@
} else if ($inline->getID()) {
$inline->delete();
$dictionary = array();
+ } else {
+ $error = pht('Comment cannot be empty.');
}
- return id(new AphrontAjaxResponse())->setContent($dictionary);
+ if ($error === null) {
+ return id(new AphrontAjaxResponse())->setContent($dictionary);
+ }
}
switch ($mode) {
@@ -151,6 +156,7 @@
->setUser($viewer)
->setName('content')
->setLabel(pht('Comment'))
+ ->setError($error)
->setValue($v_content));
return $this->newDialog()
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 18, 20:50 (2 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1108630
Default Alt Text
D25281.1737233455.diff (1 KB)
Attached To
Mode
D25281: Fix Pholio RuntimeException: Undefined variable $dictionary (when adding an empty Inline Comment)
Attached
Detach File
Event Timeline
Log In to Comment