Skip to content
Snippets Groups Projects
Commit 8a803282 authored by colemanw's avatar colemanw
Browse files

Api3 - Test fix

parent 46d8fe5a
Branches
Tags
No related merge requests found
......@@ -240,7 +240,7 @@ function _civicrm_api3_custom_value_gettree_spec(&$spec) {
'api.required' => 1,
];
$entities = civicrm_api3('Entity', 'get');
$entities = array_diff($entities['values'], $entities['deprecated']);
$entities = array_diff($entities['values'], $entities['deprecated'] ?? []);
$spec['entity_type'] = [
'title' => 'Entity Type',
'description' => 'API name of entity type, e.g. "Contact"',
......
......@@ -110,7 +110,7 @@ class api_v3_MultilingualTest extends CiviUnitTestCase {
];
// fetch all entities
$entities = $this->callAPISuccess('Entity', 'get', []);
$skippableEntities = array_merge($skippableEntities, $entities['deprecated']);
$skippableEntities = array_merge($skippableEntities, $entities['deprecated'] ?? []);
foreach ($entities['values'] as $entity) {
$params = ['check_permissions' => 1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment