Rush has submitted this change and it was merged.
Change subject: check for empty $values array to avoid potentially huge select
from maniphest_tasks with an empty where clause.
......................................................................
check for empty $values array to avoid potentially huge select
from maniphest_tasks with an empty where clause.
Change-Id: I2b0847d5bba16cbd3dda1a66546ff5aaa9d4033b
---
M src/policy/PhabricatorPolicyRuleTaskSubscribers.php
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Rush: Verified; Looks good to me, approved
diff --git a/src/policy/PhabricatorPolicyRuleTaskSubscribers.php
b/src/policy/PhabricatorPolicyRuleTaskSubscribers.php
index 7139614..dfe5659 100644
--- a/src/policy/PhabricatorPolicyRuleTaskSubscribers.php
+++ b/src/policy/PhabricatorPolicyRuleTaskSubscribers.php
@@ -11,7 +11,9 @@
public function willApplyRules(PhabricatorUser $viewer, array $values) {
$values = array_unique(array_filter(array_mergev($values)));
-
+ if (empty($values)){
+ return;
+ }
$this->subscribed_to = array();
$viewer_phid = $viewer->getPHID();
$tasks = id(new ManiphestTaskQuery())
--
To view, visit https://gerrit.wikimedia.org/r/182960
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2b0847d5bba16cbd3dda1a66546ff5aaa9d4033b
Gerrit-PatchSet: 1
Gerrit-Project: phabricator/extensions/security
Gerrit-Branch: master
Gerrit-Owner: 20after4 <[email protected]>
Gerrit-Reviewer: Rush <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits