CRM-19478 handle wierd contribution page id
authoreileen <emcnaughton@wikimedia.org>
Fri, 14 Oct 2016 08:19:08 +0000 (09:19 +0100)
committereileen <emcnaughton@wikimedia.org>
Fri, 14 Oct 2016 08:19:54 +0000 (09:19 +0100)
CRM/Contribute/BAO/Contribution.php

index db99e14b493fbda647ab31d3beab938240b1ce3b..1237d2576fd245fb1f5fe462a5a88e7f4971192d 100644 (file)
@@ -4880,7 +4880,7 @@ LIMIT 1;";
     if (!empty($contribution->source)) {
       return $contribution->source;
     }
-    elseif (!empty($contribution->contribution_page_id)) {
+    elseif (!empty($contribution->contribution_page_id) && is_numeric($contribution->contribution_page_id)) {
       $contributionPageTitle = civicrm_api3('ContributionPage', 'getvalue', array(
         'id' => $contribution->contribution_page_id,
         'return' => 'title',