// If we configured price set for contribution page
// we are not allow membership signup as well as any
// other contribution amount field, CRM-5095
- if (isset($this->_priceSetId) && $this->_priceSetId) {
+ if (!empty($this->_priceSetId)) {
$this->add('hidden', 'priceSetId', $this->_priceSetId);
// build price set form.
$this->set('priceSetId', $this->_priceSetId);
// Mark which field should have the auto-renew checkbox, if any. CRM-18305
if (!empty($form->_membershipTypeValues) && is_array($form->_membershipTypeValues)) {
$autoRenewMembershipTypes = [];
- foreach ($form->_membershipTypeValues as $membershiptTypeValue) {
- if ($membershiptTypeValue['auto_renew']) {
- $autoRenewMembershipTypes[] = $membershiptTypeValue['id'];
+ foreach ($form->_membershipTypeValues as $membershipTypeValue) {
+ if ($membershipTypeValue['auto_renew']) {
+ $autoRenewMembershipTypes[] = $membershipTypeValue['id'];
}
}
foreach ($form->_priceSet['fields'] as $field) {