diff --git a/CRM/Core/CodeGen/GenerateData.php b/CRM/Core/CodeGen/GenerateData.php index 4289ed1cf798..79ff39c92096 100644 --- a/CRM/Core/CodeGen/GenerateData.php +++ b/CRM/Core/CodeGen/GenerateData.php @@ -1556,6 +1556,9 @@ private function addMembership() { * @return string */ public static function repairDate($date) { + if ($date === NULL) { + return ''; + } $dropArray = ['-' => '', ':' => '', ' ' => '']; return strtr($date, $dropArray); }