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:
@@ -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)))
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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')))
|
||||
|
||||
@@ -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')))
|
||||
|
||||
@@ -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')))
|
||||
|
||||
Reference in New Issue
Block a user