issue: Fix Deprecation Warnings (line_endings)

This fixes the Deprecation warnings when attempting to set INI directive
`ini_set('auto_detect_line_endings', true)`. This directive is no longer
supported so this removes the calls completely.
This commit is contained in:
JediKev
2022-08-19 12:26:30 -05:00
parent 22b599e314
commit c24ee5753e
5 changed files with 0 additions and 12 deletions

View File

@@ -31,8 +31,6 @@ class CsvImporter {
function __construct($stream) {
// File upload
if (is_array($stream) && !$stream['error']) {
// Properly detect Macintosh style line endings
ini_set('auto_detect_line_endings', true);
$this->stream = fopen($stream['tmp_name'], 'r');
// Skip Byte Order Mark (BOM) if present
if (!self::isBOM(fgets($this->stream, 4)))

View File

@@ -596,8 +596,6 @@ class DynamicList extends VerySimpleModel implements CustomList {
function importFromPost($stuff, $extra=array()) {
if (is_array($stuff) && !$stuff['error']) {
// Properly detect Macintosh style line endings
ini_set('auto_detect_line_endings', true);
$stream = fopen($stuff['tmp_name'], 'r');
}
elseif ($stuff) {

View File

@@ -51,9 +51,6 @@ class AgentManager extends Module {
switch ($args['action']) {
case 'import':
// Properly detect Macintosh style line endings
ini_set('auto_detect_line_endings', true);
if (!$options['file'] || $options['file'] == '-')
$options['file'] = 'php://stdin';
if (!($this->stream = fopen($options['file'], 'rb')))

View File

@@ -38,8 +38,6 @@ class ListManager extends Module {
if (!$list)
$this->fail("List ID required for items import");
// Properly detect Macintosh style line endings
ini_set('auto_detect_line_endings', true);
if (!$options['file'])
$this->fail('CSV file to import list items from is required!');
elseif (!($this->stream = fopen($options['file'], 'rb')))

View File

@@ -53,9 +53,6 @@ class UserManager extends Module {
switch ($args['action']) {
case 'import':
// Properly detect Macintosh style line endings
ini_set('auto_detect_line_endings', true);
if (!$options['file'] || $options['file'] == '-')
$options['file'] = 'php://stdin';
if (!($this->stream = fopen($options['file'], 'rb')))