mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 02:32:42 +01:00
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
This commit is contained in:
parent
589f1c7696
commit
0ae7335316
1 changed files with 3 additions and 2 deletions
|
@ -35,7 +35,7 @@ final class HeraldRuleController extends HeraldController {
|
||||||
} else {
|
} else {
|
||||||
$rule = new HeraldRule();
|
$rule = new HeraldRule();
|
||||||
$rule->setAuthorPHID($user->getPHID());
|
$rule->setAuthorPHID($user->getPHID());
|
||||||
$rule->setMustMatchAll(true);
|
$rule->setMustMatchAll(1);
|
||||||
|
|
||||||
$content_type = $request->getStr('content_type');
|
$content_type = $request->getStr('content_type');
|
||||||
$rule->setContentType($content_type);
|
$rule->setContentType($content_type);
|
||||||
|
@ -206,7 +206,8 @@ final class HeraldRuleController extends HeraldController {
|
||||||
|
|
||||||
private function saveRule(HeraldAdapter $adapter, $rule, $request) {
|
private function saveRule(HeraldAdapter $adapter, $rule, $request) {
|
||||||
$rule->setName($request->getStr('name'));
|
$rule->setName($request->getStr('name'));
|
||||||
$rule->setMustMatchAll(($request->getStr('must_match') == 'all'));
|
$match_all = ($request->getStr('must_match') == 'all');
|
||||||
|
$rule->setMustMatchAll((int)$match_all);
|
||||||
|
|
||||||
$repetition_policy_param = $request->getStr('repetition_policy');
|
$repetition_policy_param = $request->getStr('repetition_policy');
|
||||||
$rule->setRepetitionPolicy(
|
$rule->setRepetitionPolicy(
|
||||||
|
|
Loading…
Reference in a new issue