20after4 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/182960

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions/security 
refs/changes/60/182960/1

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: newchange
Gerrit-Change-Id: I2b0847d5bba16cbd3dda1a66546ff5aaa9d4033b
Gerrit-PatchSet: 1
Gerrit-Project: phabricator/extensions/security
Gerrit-Branch: master
Gerrit-Owner: 20after4 <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to