Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2624714
D25636.1731797387.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
D25636.1731797387.diff
View Options
diff --git a/src/applications/badges/controller/PhabricatorBadgesAwardController.php b/src/applications/badges/controller/PhabricatorBadgesAwardController.php
--- a/src/applications/badges/controller/PhabricatorBadgesAwardController.php
+++ b/src/applications/badges/controller/PhabricatorBadgesAwardController.php
@@ -19,17 +19,17 @@
if ($request->isFormPost()) {
$badge_phids = $request->getArr('badgePHIDs');
- $badges = id(new PhabricatorBadgesQuery())
- ->setViewer($viewer)
- ->withPHIDs($badge_phids)
- ->requireCapabilities(
- array(
- PhabricatorPolicyCapability::CAN_EDIT,
- PhabricatorPolicyCapability::CAN_VIEW,
- ))
- ->execute();
- if (!$badges) {
- return new Aphront404Response();
+ $badges = array();
+ if (!empty($badge_phids)) {
+ $badges = id(new PhabricatorBadgesQuery())
+ ->setViewer($viewer)
+ ->withPHIDs($badge_phids)
+ ->requireCapabilities(
+ array(
+ PhabricatorPolicyCapability::CAN_EDIT,
+ PhabricatorPolicyCapability::CAN_VIEW,
+ ))
+ ->execute();
}
$award_phids = array($user->getPHID());
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 22:49 (2 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
975005
Default Alt Text
D25636.1731797387.diff (1 KB)
Attached To
Mode
D25636: Fix exception awarding empty badge to user
Attached
Detach File
Event Timeline
Log In to Comment