Merge pull request #23076 from eileenmcnaughton/cont_status
[civicrm-core.git] / CRM / Core / DAO.php
index 6cb84d25e28ea5b7689305443c9c9de590da7a05..31c43e0b78f626c515e62ec9ae8ab1fe88f13103 100644 (file)
@@ -81,6 +81,10 @@ class CRM_Core_DAO extends DB_DataObject {
     QUERY_FORMAT_WILDCARD = 1,
     QUERY_FORMAT_NO_QUOTES = 2,
 
+    /**
+     * No serialization.
+     */
+    SERIALIZE_NONE = 0,
     /**
      * Serialized string separated by and bookended with VALUE_SEPARATOR
      */
@@ -3310,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;