Refactor Pico::parseFileMeta()
This commit is contained in:
parent
6cb378e83f
commit
9aaab5de1a
1 changed files with 2 additions and 5 deletions
|
@ -772,7 +772,7 @@ class Pico
|
|||
$meta[$fieldId] = $meta[$fieldName];
|
||||
unset($meta[$fieldName]);
|
||||
}
|
||||
} else {
|
||||
} elseif (!isset($meta[$fieldId])) {
|
||||
// guarantee array key existance
|
||||
$meta[$fieldId] = '';
|
||||
}
|
||||
|
@ -786,10 +786,7 @@ class Pico
|
|||
}
|
||||
} else {
|
||||
// guarantee array key existance
|
||||
foreach ($headers as $id => $field) {
|
||||
$meta[$id] = '';
|
||||
}
|
||||
|
||||
$meta = array_fill_keys(array_keys($headers), '');
|
||||
$meta['time'] = $meta['date_formatted'] = '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue