From e5fff53221332fd80fe5947bc327afa4ed090c1a Mon Sep 17 00:00:00 2001 From: Pascal Jungblut Date: Mon, 30 Dec 2019 11:21:25 +0100 Subject: [PATCH] Change a newly-deprecated array access PHP allowed array accesses with curly braces but deprecated the feature [1] with 7.4. With this change the CSV import will work with 7.4 without any errors or warnings. The change does not affect other versions. [1] https://wiki.php.net/rfc/deprecate_curly_braces_array_access --- app/Support/Import/Routine/File/ImportableConverter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Support/Import/Routine/File/ImportableConverter.php b/app/Support/Import/Routine/File/ImportableConverter.php index 5681bce30b..51ffb39c94 100644 --- a/app/Support/Import/Routine/File/ImportableConverter.php +++ b/app/Support/Import/Routine/File/ImportableConverter.php @@ -142,7 +142,7 @@ class ImportableConverter try { // add exclamation mark for better parsing. http://php.net/manual/en/datetime.createfromformat.php $dateFormat = $this->config['date-format'] ?? 'Ymd'; - if ('!' !== $dateFormat{0}) { + if ('!' !== $dateFormat[0]) { $dateFormat = '!' . $dateFormat; } $object = Carbon::createFromFormat($dateFormat, $date);