From d78a705e3f46d24da7cbc7c6b4eac31aaae95b8a Mon Sep 17 00:00:00 2001 From: moremanish Date: Wed, 3 Dec 2014 14:01:45 +0530 Subject: [PATCH] Minor fix-2 --- CRM/Pledge/Page/AJAX.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/Pledge/Page/AJAX.php b/CRM/Pledge/Page/AJAX.php index 59de5ef66c89..895315df7245 100755 --- a/CRM/Pledge/Page/AJAX.php +++ b/CRM/Pledge/Page/AJAX.php @@ -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(); }