diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 7da403be52e..4ca2a4839d3 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -803,10 +803,7 @@ class Export $remaintopay = $tmpobjforcomputecall->getRemainToPay(); } $obj->$alias = $remaintopay; - } elseif (is_array($item) && - array_key_exists('rule', $item) && - $item['rule'] == 'compute' - ) { + } elseif (is_array($item) && array_key_exists('rule', $item) && $item['rule'] == 'compute') { // Custom compute $alias = str_replace(array('.', '-', '(', ')'), '_', $key); $value = ''; @@ -853,11 +850,11 @@ class Export // TODO FIXME // Export of compute field does not work. $obj contains $obj->alias_field and formula may contains $obj->field // Also the formula may contains objects of class that are not loaded. - $computestring = is_string($item) ? $item : json_encode($item); + //$computestring = is_string($item) ? $item : json_encode($item); //$tmp = (string) dol_eval($computestring, 1, 0, '2'); //$obj->$alias = $tmp; - $this->error = "ERROPNOTSUPPORTED. Operation ".$computestring." not supported. Export of 'computed' extrafields is not yet supported, please remove field."; + $this->error = "ERRORNOTSUPPORTED. Operation not supported. Export of ".var_export($key, true).' '.var_export($item, true)." extrafields is not yet supported, please remove field."; return -1; } }