// Temporary hack - in 5.27 a new field is added to civicrm_custom_field. There is a high
// risk this function is called before the upgrade page can be reached and if
// so it will potentially result in fatal error.
- $serializeField = CRM_Core_BAO_Domain::isDBVersionAtLeast('5.27.alpha1') ? '' : "$cfTable.serialize,";
+ $serializeField = CRM_Core_BAO_Domain::isDBVersionAtLeast('5.27.alpha1') ? "$cfTable.serialize," : '';
$query = "SELECT $cfTable.id, $cfTable.label,
$cgTable.title,
}
// if db.ver > code.ver, sth really wrong
- if (version_compare($dbVersion, $codeVersion) > 0) {
+ if (!CRM_Core_BAO_Domain::isDBUpdateRequired()) {
$messages[] = new CRM_Utils_Check_Message(
__FUNCTION__,
ts('Your database is marked with an unexpected version number: %1. The v%2 codebase may not be compatible with your database state.
* @return array
*/
function civicrm_api3_custom_field_get($params) {
- if (!CRM_Core_BAO_Domain::isDBVersionAtLeast('5.27.alpha1') && ($params['legacy_html_type'] ?? TRUE) && !empty($params['return'])) {
+ if (CRM_Core_BAO_Domain::isDBVersionAtLeast('5.27.alpha1') && ($params['legacy_html_type'] ?? TRUE) && !empty($params['return'])) {
if (is_array($params['return'])) {
$params['return'][] = 'serialize';
}