Upgrade to 3.9.6
This commit is contained in:
@@ -93,10 +93,14 @@ class Txt extends Handler
|
||||
throw new InvalidArgumentException('Invalid TXT data; please pass a string');
|
||||
}
|
||||
|
||||
// remove BOM
|
||||
$string = str_replace("\xEF\xBB\xBF", '', $string);
|
||||
// remove Unicode BOM at the beginning of the file
|
||||
if (Str::startsWith($string, "\xEF\xBB\xBF") === true) {
|
||||
$string = substr($string, 3);
|
||||
}
|
||||
|
||||
// explode all fields by the line separator
|
||||
$fields = preg_split('!\n----\s*\n*!', $string);
|
||||
|
||||
// start the data array
|
||||
$data = [];
|
||||
|
||||
|
Reference in New Issue
Block a user