Page MenuHomePhorge

D25636.1731797387.diff
No OneTemporary

D25636.1731797387.diff

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

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)

Event Timeline