//flush component settings
CRM_Core_Component::getEnabledComponents(TRUE);
+ $_REQUEST = $_GET = $_POST = [];
error_reporting(E_ALL);
$this->_sethtmlGlobals();
if ($this->hookClass) {
$this->hookClass->reset();
}
- $session = CRM_Core_Session::singleton();
- $session->set('userID', NULL);
+ CRM_Core_Session::singleton()->reset(1);
if ($this->tx) {
$this->tx->rollback()->commit();
'defaultValue' => 'Default Value',
'lowercasevalue' => 'Lowercase Value',
1 => 'Integer Value',
+ 'NULL' => 'NULL',
];
$custom_field_params = ['sequential' => 1, 'id' => $customField['id']];
$custom_field_api_result = $this->callAPISuccess('custom_field', 'get', $custom_field_params);
),
$params
);
- $newPaymentInstrument = $this->callAPISuccess('OptionValue', 'create', $params);
+ $newPaymentInstrument = $this->callAPISuccess('OptionValue', 'create', $params)['id'];
$relationTypeID = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Asset Account is' "));
$financialAccountParams = [
'entity_table' => 'civicrm_option_value',
- 'entity_id' => key($newPaymentInstrument),
+ 'entity_id' => $newPaymentInstrument,
'account_relationship' => $relationTypeID,
'financial_account_id' => $this->callAPISuccess('FinancialAccount', 'getValue', ['name' => $financialAccountName, 'return' => 'id']),
];