Skip to content

Commit

Permalink
Merge pull request #15428 from greenpeace-cee/fix-status-check
Browse files Browse the repository at this point in the history
Fix status check not rendering before 5.19 migrations
  • Loading branch information
eileenmcnaughton authored Oct 7, 2019
2 parents 7123fc5 + 5a74bbd commit 41c0e58
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions CRM/Utils/Check/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,19 @@ public function checkAll() {
* @throws \Civi\API\Exception\UnauthorizedException
*/
public function isDisabled($method) {

$checks = $this->getChecksConfig();
if (!empty($checks[$method])) {
return (bool) empty($checks[$method]['is_active']);
try {
$checks = $this->getChecksConfig();
if (!empty($checks[$method])) {
return (bool) empty($checks[$method]['is_active']);
}
}
catch (PEAR_Exception $e) {
// if we're hitting this, DB migration to 5.19 probably hasn't run yet, so
// is_active doesn't exist. Ignore this error so the status check (which
// might warn about missing migrations!) still renders.
// TODO: remove at some point after 5.19
}

return FALSE;
}

Expand Down

0 comments on commit 41c0e58

Please sign in to comment.