Fix unit test - don't use empty string as name
authorColeman Watts <coleman@civicrm.org>
Fri, 1 Apr 2022 17:02:14 +0000 (13:02 -0400)
committerColeman Watts <coleman@civicrm.org>
Fri, 1 Apr 2022 17:02:14 +0000 (13:02 -0400)
CRM/Core/DAO.php

index 290676183aa1f2ea7cba4312923b58ec0cc80409..31c43e0b78f626c515e62ec9ae8ab1fe88f13103 100644 (file)
@@ -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;