Skip to content
Snippets Groups Projects
Unverified Commit 5a74bbd5 authored by Patrick Figel's avatar Patrick Figel
Browse files

Fix status check not rendering before 5.19 migrations

This fixes an issue where the status check page does not render when
migrations to 5.19 are pending because the is_active column hasn't been
added yet.

The rationale for this change is to avoid scenarios where users forget
to run upgrades because there's no status check warning.
parent ab134426
Branches
Tags
No related merge requests found
......@@ -104,11 +104,19 @@ abstract class CRM_Utils_Check_Component {
* @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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment