Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix status check not rendering before 5.19 migrations #15428

Merged
merged 1 commit into from
Oct 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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