Skip to content

Commit

Permalink
Minor fix-2
Browse files Browse the repository at this point in the history
  • Loading branch information
moremanish committed Dec 3, 2014
1 parent d556e75 commit d78a705
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CRM/Pledge/Page/AJAX.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@ static function pledgeName() {
* for batch entry pledges
*/
function getPledgeDefaults() {
$pledgeID = CRM_Utils_Type::escape($_POST['pid'], 'Integer');
$details = CRM_Pledge_BAO_PledgePayment::getOldestPledgePayment($pledgeID);
$details = array();
if (!empty($_POST['pid'])) {
$pledgeID = CRM_Utils_Type::escape($_POST['pid'], 'Integer');
$details = CRM_Pledge_BAO_PledgePayment::getOldestPledgePayment($pledgeID);
}
echo json_encode($details);
CRM_Utils_System::civiExit();
}
Expand Down

0 comments on commit d78a705

Please sign in to comment.