init $colmap early

This commit is contained in:
Uwe Steinmann 2020-09-06 07:46:31 +02:00
parent 1eee3f1335
commit ab0dfee213

View File

@ -128,6 +128,7 @@ if (!$user->isAdmin()) {
$log = array();
$newusers = array();
$csvheader = array();
$colmap = array();
if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) {
if(!is_uploaded_file($_FILES["userdata"]["tmp_name"]))
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
@ -137,7 +138,6 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) {
$csvdelim = ';';
$csvencl = '"';
$colmap = array();
if($fp = fopen($_FILES['userdata']['tmp_name'], 'r')) {
/* First of all build up a column map, which contains for each columen
* the column name