@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add missing (int) casts to Herald rule editing

Summary: Fixes T3792. These raise errors if the database is in strict mode and you try to create an "any" rule.

Test Plan: Created a rule with "any".

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3792

Differential Revision: https://secure.phabricator.com/D6883

+3 -2
+3 -2
src/applications/herald/controller/HeraldRuleController.php
··· 35 35 } else { 36 36 $rule = new HeraldRule(); 37 37 $rule->setAuthorPHID($user->getPHID()); 38 - $rule->setMustMatchAll(true); 38 + $rule->setMustMatchAll(1); 39 39 40 40 $content_type = $request->getStr('content_type'); 41 41 $rule->setContentType($content_type); ··· 206 206 207 207 private function saveRule(HeraldAdapter $adapter, $rule, $request) { 208 208 $rule->setName($request->getStr('name')); 209 - $rule->setMustMatchAll(($request->getStr('must_match') == 'all')); 209 + $match_all = ($request->getStr('must_match') == 'all'); 210 + $rule->setMustMatchAll((int)$match_all); 210 211 211 212 $repetition_policy_param = $request->getStr('repetition_policy'); 212 213 $rule->setRepetitionPolicy(