Merge pull request #2932 from pascalj/deprecated-array-access

Change a newly-deprecated array access
This commit is contained in:
James Cole 2019-12-30 10:34:28 +00:00 committed by GitHub
commit c0e991e096
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);