From c6336380b9ae228da5a709327c639bf0056cce94 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 1 Apr 2022 13:02:14 -0400 Subject: [PATCH] Fix unit test - don't use empty string as name --- CRM/Core/DAO.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 290676183a..31c43e0b78 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -3314,8 +3314,8 @@ SELECT contact_id return; } $label = $this->label ?? $this->title ?? NULL; - if (!$label && $label !== '0' && !$isRequired) { - // No label supplied and name not required, do nothing + if (!$label && $label !== '0') { + // No label supplied, do nothing return; } $maxLen = static::getSupportedFields()['name']['maxlength'] ?? 255; -- 2.25.1