class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment {
use CRM_Core_Form_EntityFormTrait;
- /**
- * The id of the object being edited / created
- *
- * @var int
- */
- public $_id;
/**
* Membership Type ID
public function preProcess() {
// Check for edit permission.
if (!CRM_Core_Permission::checkActionPermission('CiviMember', $this->_action)) {
- CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
+ CRM_Core_Error::statusBounce(ts('You do not have permission to access this page.'));
}
if (!CRM_Member_BAO_Membership::statusAvailabilty()) {
// all possible statuses are disabled - redirect back to contact form
* @return array
*/
protected static function getPriceSetDetails($params) {
- $priceSetID = CRM_Utils_Array::value('price_set_id', $params);
+ $priceSetID = $params['price_set_id'] ?? NULL;
if ($priceSetID) {
return CRM_Price_BAO_PriceSet::getSetDetail($priceSetID);
}
* @return int
*/
protected static function getPriceSetID($params) {
- $priceSetID = CRM_Utils_Array::value('price_set_id', $params);
+ $priceSetID = $params['price_set_id'] ?? NULL;
if (!$priceSetID) {
$priceSetDetails = self::getPriceSetDetails($params);
return key($priceSetDetails);