Skip to content

Commit

Permalink
Remove unnecessary try/catch per civicrm#17729
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Jul 14, 2020
1 parent 2aeddfe commit 185a076
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions CRM/Utils/Check/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,10 @@ public function checkAll() {
* @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;
}

Expand Down

0 comments on commit 185a076

Please sign in to comment.