Skip to content

Commit

Permalink
fixup! Display agreements in detailed policy page
Browse files Browse the repository at this point in the history
  • Loading branch information
ajparsons committed Feb 8, 2024
1 parent 0001007 commit ededb78
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion classes/Policies.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct($policy_id = null) {
6672,
);

$this->all_policy_agreements = $policy_data['agreements'];
$this->all_policy_agreements = $policy_data['agreements'] ?? [];

if ( $policy_id ) {
$this->policy_id = $policy_id;
Expand Down
2 changes: 1 addition & 1 deletion www/docs/mp/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@

if ( $policyID ) {
$data['policydivisions'] = $divisions->getMemberDivisionsForPolicy($policyID);
$rel_agreements = $policiesList->all_policy_agreements[$policyID];
$rel_agreements = $policiesList->all_policy_agreements[$policyID] ?? [];
// filter down to where 'date' is within the member's term
// This won't be perfect where the member has been in and out of the house
// But it doesn't affect their score.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
foreach ($policydivisions as $policy) { ?>

<?php
$current_policy_agreements = $policyagreements[$policy['policy_id']];
$current_policy_agreements = $policyagreements[$policy['policy_id']] ?? [];
$divisions_scoring = [];
$divisions_informative = [];
$agreements_scoring = [];
Expand Down

0 comments on commit ededb78

Please sign in to comment.