From: eileen Date: Mon, 25 Nov 2019 03:55:54 +0000 (+1300) Subject: Code comments X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a03898d942a2abf54aaf655efb206ee23c58ef57;p=civicrm-core.git Code comments --- diff --git a/CRM/Core/Report/Excel.php b/CRM/Core/Report/Excel.php index 127f23e5c4..a172071fee 100644 --- a/CRM/Core/Report/Excel.php +++ b/CRM/Core/Report/Excel.php @@ -70,13 +70,14 @@ class CRM_Core_Report_Excel { else { // loic1 : always enclose fields //$value = ereg_replace("\015(\012)?", "\012", $value); + // Convert carriage return to line feed. $value = preg_replace("/\015(\012)?/", "\012", $value); if ((substr($value, 0, 1) == CRM_Core_DAO::VALUE_SEPARATOR) && (substr($value, -1, 1) == CRM_Core_DAO::VALUE_SEPARATOR) ) { $strArray = explode(CRM_Core_DAO::VALUE_SEPARATOR, $value); - + // Filter out empty value separated strings. foreach ($strArray as $key => $val) { if (trim($val) == '') { unset($strArray[$key]);