Skip to content
Snippets Groups Projects
Unverified Commit c1e4d09d authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #17823 from colemanw/upgradeSafe

Remove unnecessary try/catch per #17729
parents ab5db05b 185a0768
Branches
Tags
No related merge requests found
......@@ -88,19 +88,10 @@ abstract class CRM_Utils_Check_Component {
* @throws \Civi\API\Exception\UnauthorizedException
*/
public function isDisabled($method) {
try {
$checks = $this->getChecksConfig();
if (!empty($checks[$method])) {
return (bool) empty($checks[$method]['is_active']);
}
$checks = $this->getChecksConfig();
if (isset($checks[$method]['is_active'])) {
return !$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