Minor simplification
authoreileen <emcnaughton@wikimedia.org>
Thu, 25 Mar 2021 06:50:37 +0000 (19:50 +1300)
committereileen <emcnaughton@wikimedia.org>
Fri, 26 Mar 2021 01:04:55 +0000 (14:04 +1300)
CRM/Contribute/Form/Task/PDF.php

index 016f01d0306eaa5944aef7c64b52bfc8aab8241c..8a7ce4c5cd32a01ba930739bf507a2fce3a65a5c 100644 (file)
@@ -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);