Skip to content

Conversation

gharlan
Copy link
Contributor

@gharlan gharlan commented Aug 16, 2022


if (!ini_get("auto_detect_line_endings")) {
ini_set("auto_detect_line_endings", '1');
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich würde das ganz entfernen. Eingefügt hattest du es hier: 9c3c645
Benötigt wird es aber nur für Dateien, die die alten Mac-Line-Endings (\r) haben. Also Dateien, die noch vor OS X erstellt wurden, in Mac OS 9 oder früher. Seit OS X nutzt Mac ja die Unix-Line-Endings \n.

https://php.watch/versions/8.1/auto_detect_line_endings-ini-deprecated

Wenn es dir lieber ist, könnten wir aber auch eine dieser Varianten nutzen:

  • Mit PHP-Weiche, ini-Option nur bei PHP<8.1 setzen
  • Mit PHP-Weiche, ini-Option nur bei PHP<9 setzen (da wird die Option ja erst ganz entfernt) und @ nutzen um die Deprecations seit PHP 8.1 zu unterdrücken

@tbaddade tbaddade merged commit cc28323 into tbaddade:master Aug 22, 2022
@tbaddade
Copy link
Owner

Danke dir

@gharlan gharlan deleted the php81 branch August 22, 2022 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP 8.1: auto_detect_line_endings is deprecated PHP 8.1: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
2 participants