diff --git a/htdocs/core/commonfieldsinexport.inc.php b/htdocs/core/commonfieldsinexport.inc.php index 034fbcd4679..9f416079cce 100644 --- a/htdocs/core/commonfieldsinexport.inc.php +++ b/htdocs/core/commonfieldsinexport.inc.php @@ -19,7 +19,7 @@ if (class_exists($keyforclass)) $fieldname = $keyforalias . '.' . $keyfield; $fieldlabel = ucfirst($valuefield['label']); $typeFilter = "Text"; - $typefield=preg_replace('/\(.*$/', '', $valuefield['type']); // double(24,8) -> double + $typefield = preg_replace('/\(.*$/', '', $valuefield['type']); // double(24,8) -> double switch ($typefield) { case 'int': case 'integer': @@ -47,7 +47,10 @@ if (class_exists($keyforclass)) * break; */ } - $helpfield=preg_replace('/\(.*$/', '', $valuefield['help']); + $helpfield = ''; + if (! empty($valuefield['help'])) { + $helpfield = preg_replace('/\(.*$/', '', $valuefield['help']); + } if ($valuefield['enabled']) { $this->export_fields_array[$r][$fieldname] = $fieldlabel; $this->export_TypeFields_array[$r][$fieldname] = $typeFilter;