From: eileen Date: Thu, 25 Mar 2021 06:50:37 +0000 (+1300) Subject: Minor simplification X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6f57e9380a7c6521b787f00138a102e3b1928f36;p=civicrm-core.git Minor simplification --- diff --git a/CRM/Contribute/Form/Task/PDF.php b/CRM/Contribute/Form/Task/PDF.php index 016f01d030..8a7ce4c5cd 100644 --- a/CRM/Contribute/Form/Task/PDF.php +++ b/CRM/Contribute/Form/Task/PDF.php @@ -42,9 +42,8 @@ SELECT count(*) FROM civicrm_contribution WHERE contribution_status_id != 1 AND {$this->_componentClause}"; - $count = CRM_Core_DAO::singleValueQuery($query); - if ($count != 0) { - CRM_Core_Error::statusBounce("Please select only online contributions with Completed status."); + if (CRM_Core_DAO::singleValueQuery($query)) { + CRM_Core_Error::statusBounce("Please select only contributions with Completed status."); } $this->assign('single', $this->_single);