Skip to content

Commit 0df6567

Browse files
committed
test fixes re customfield and setup.xml loading
1 parent 349d29b commit 0df6567

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tests/tine20/Tinebase/CustomFieldTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public function testCustomFieldRecordsResolving()
139139
array('field' => 'n_family', 'operator' => 'equals', 'value' => 'Friendly')
140140
), 'AND');
141141

142+
Addressbook_Controller_Contact::getInstance()->resolveCustomfields(true);
142143
$jsonResult = (new Addressbook_Frontend_Json)->searchContacts($filter->toArray(), []);
143144
$this->assertSame($jsonResult['results'][0]['n_given'], 'Matt');
144145
$this->assertArrayNotHasKey($cf1->name, $jsonResult['results'][0]['customfields'] ?? []);

tine20/Setup/Controller.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,10 @@ public function getSetupXml($_applicationName, $_disableAppIfNotFound = false)
784784
}
785785
}
786786

787-
$xml = simplexml_load_file($setupXML);
787+
if (false === ($xml = simplexml_load_file($setupXML))) {
788+
Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . ' ' . $setupXML
789+
. ' failed to load xml: ' . print_r(libxml_get_last_error(), true));
790+
}
788791

789792
return $xml;
790793
}

0 commit comments

Comments
 (0)