Giter VIP home page Giter VIP logo

Comments (4)

MarkBaker avatar MarkBaker commented on June 22, 2024

In PHP 8.1, the auto_detect_line_endings INI directive has been deprecated, not deleted.

from phpspreadsheet.

KIMKYEONGYONG avatar KIMKYEONGYONG commented on June 22, 2024

phpoffice/phpspreadsheet 1.29.0 ver

PhpOffice\PhpSpreadsheet\Reader\Csv;

private function setAutoDetect(?string $value): ?string
{
    $retVal = null;
    if ($value !== null && $this->testAutodetect) {
        $retVal2 = @ini_set('auto_detect_line_endings', $value);  <<  error!
        if (is_string($retVal2)) {
            $retVal = $retVal2;
        }
    }

    return $retVal;
}

from phpspreadsheet.

MarkBaker avatar MarkBaker commented on June 22, 2024

There should be no error in this code, and that line should not generate any error.

What is the exact error message that you are getting?

from phpspreadsheet.

oleibman avatar oleibman commented on June 22, 2024

I have seen cases where user-supplied error handlers have inappropriately detected and converted the suppressed deprecation message to an error despite the use of the at-sign to suppress messages. That is the reason for the check on testAutodetect in the code cited above. Users unwilling to correct their error handler can add $reader->setTestAutodetect(false) to their code before loading the spreadsheet; they will prematurely lose the ability to detect Mac line endings (which is very unlikely to be an issue), and the error message will go away because ini_set will not be called.

from phpspreadsheet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.