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

View File

@@ -142,7 +142,7 @@ class ImportableConverter
try { try {
// add exclamation mark for better parsing. http://php.net/manual/en/datetime.createfromformat.php // add exclamation mark for better parsing. http://php.net/manual/en/datetime.createfromformat.php
$dateFormat = $this->config['date-format'] ?? 'Ymd'; $dateFormat = $this->config['date-format'] ?? 'Ymd';
if ('!' !== $dateFormat{0}) { if ('!' !== $dateFormat[0]) {
$dateFormat = '!' . $dateFormat; $dateFormat = '!' . $dateFormat;
} }
$object = Carbon::createFromFormat($dateFormat, $date); $object = Carbon::createFromFormat($dateFormat, $date);