Remove OS9 line ending support again, this was left out for a reason.

Fix tests after issue 804 was fixed.
release-1.3
Thomas Keller 2012-05-04 01:01:33 +02:00
parent b6acf4c0e2
commit dd2fa6f902
2 changed files with 4 additions and 3 deletions

View File

@ -147,6 +147,8 @@ class IDF_FileUtil
* Splits a string into separate lines while retaining the individual * Splits a string into separate lines while retaining the individual
* line ending character for every line. * line ending character for every line.
* *
* OS 9 line endings are not supported.
*
* @param string content * @param string content
* @param boolean if true, skip completely empty lines * @param boolean if true, skip completely empty lines
* @return string * @return string
@ -155,7 +157,7 @@ class IDF_FileUtil
{ {
$last_off = 0; $last_off = 0;
$lines = array(); $lines = array();
while (preg_match("/\r\n|\n|\r/", $content, $m, PREG_OFFSET_CAPTURE, $last_off)) { while (preg_match("/\r\n|\n/", $content, $m, PREG_OFFSET_CAPTURE, $last_off)) {
$next_off = strlen($m[0][0]) + $m[0][1]; $next_off = strlen($m[0][0]) + $m[0][1];
$line = substr($content, $last_off, $next_off - $last_off); $line = substr($content, $last_off, $next_off - $last_off);
$last_off = $next_off; $last_off = $next_off;

View File

@ -80,7 +80,6 @@
0 => '', 0 => '',
1 => 11, 1 => 11,
2 => ' 2 => '
', ',
), ),
), ),
@ -102,4 +101,4 @@
), ),
), ),
), ),
); );