diff --git a/classes/Policies.php b/classes/Policies.php index a8576817b6..e077de3dc6 100644 --- a/classes/Policies.php +++ b/classes/Policies.php @@ -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; diff --git a/www/docs/mp/index.php b/www/docs/mp/index.php index 78abc1307e..751215e2bf 100644 --- a/www/docs/mp/index.php +++ b/www/docs/mp/index.php @@ -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. diff --git a/www/includes/easyparliament/templates/html/mp/divisions.php b/www/includes/easyparliament/templates/html/mp/divisions.php index 3b1f5623b4..6d3ae6e9c2 100644 --- a/www/includes/easyparliament/templates/html/mp/divisions.php +++ b/www/includes/easyparliament/templates/html/mp/divisions.php @@ -54,7 +54,7 @@ foreach ($policydivisions as $policy) { ?>