Fix hard crash of test-suite due to syntax error
authorTim Otten <totten@civicrm.org>
Tue, 15 Jul 2014 00:27:44 +0000 (17:27 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 15 Jul 2014 00:27:44 +0000 (17:27 -0700)
Note: This is *only* a syntax fix. I don't what's supposed to be going on,
and there are other tests which fails... but at least they don't
crash the test-suite.

Original change was: 9e2ee07bf82624fe50070e14ccc6aa39ffa1b7d9

api/v3/Contribution.php

index 17e260824d91b5ff58d5a24d94951006f9354d58..0b5b5acc2b164a06082acf14b132d08ec3097846 100644 (file)
@@ -384,7 +384,7 @@ function civicrm_api3_contribution_completetransaction(&$params) {
     if(!$contribution->loadRelatedObjects($input, $ids, FALSE, TRUE)){
       throw new API_Exception('failed to load related objects');
     }
-    elseif ($contribution['contribution_status_id'] == CRM_Core_OptionGroup::getValue('contribution_status', 'Completed', 'name')) {
+    elseif ($contribution->contribution_status_id == CRM_Core_OptionGroup::getValue('contribution_status', 'Completed', 'name')) {
       throw new API_Exception(ts('Contribution already completed'));
     }
     $objects = $contribution->_relatedObjects;