mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-30 12:43:57 -06:00
Some array_keys fixes.
This commit is contained in:
parent
0d198193db
commit
9a53d8c21c
@ -424,7 +424,8 @@ class ImportController extends Controller
|
|||||||
$type = strtolower($job->file_type);
|
$type = strtolower($job->file_type);
|
||||||
|
|
||||||
// validate type:
|
// validate type:
|
||||||
$validTypes = array_keys('firefly.import_formats');
|
$validTypes = array_keys(config('firefly.import_formats'));
|
||||||
|
|
||||||
|
|
||||||
if (in_array($type, $validTypes)) {
|
if (in_array($type, $validTypes)) {
|
||||||
/** @var SetupInterface $importer */
|
/** @var SetupInterface $importer */
|
||||||
|
@ -123,7 +123,7 @@ class CsvImporter implements ImporterInterface
|
|||||||
// find the role for this column:
|
// find the role for this column:
|
||||||
$role = $config['column-roles'][$rowIndex] ?? '_ignore';
|
$role = $config['column-roles'][$rowIndex] ?? '_ignore';
|
||||||
$doMap = $config['column-do-mapping'][$rowIndex] ?? false;
|
$doMap = $config['column-do-mapping'][$rowIndex] ?? false;
|
||||||
$validConverters = array_keys('csv.import_roles');
|
$validConverters = array_keys(config('csv.import_roles'));
|
||||||
|
|
||||||
// throw error when not a valid converter.
|
// throw error when not a valid converter.
|
||||||
if (!in_array($role, $validConverters)) {
|
if (!in_array($role, $validConverters)) {
|
||||||
|
@ -361,7 +361,7 @@ class CsvSetup implements SetupInterface
|
|||||||
$reader = Reader::createFromString($content);
|
$reader = Reader::createFromString($content);
|
||||||
$reader->setDelimiter($config['delimiter']);
|
$reader->setDelimiter($config['delimiter']);
|
||||||
$results = $reader->fetch();
|
$results = $reader->fetch();
|
||||||
$validSpecifics = array_keys('csv.import_specifics');
|
$validSpecifics = array_keys(config('csv.import_specifics'));
|
||||||
|
|
||||||
foreach ($results as $rowIndex => $row) {
|
foreach ($results as $rowIndex => $row) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user