diff --git a/src/Stringy.php b/src/Stringy.php index ccb6f5a..49fd4a9 100644 --- a/src/Stringy.php +++ b/src/Stringy.php @@ -716,7 +716,7 @@ public function length() */ public function lines() { - $array = $this->split('[\r\n]{1,2}', $this->str); + $array = $this->split('[\r\n]{1,2}'); for ($i = 0; $i < count($array); $i++) { $array[$i] = static::create($array[$i], $this->encoding); } diff --git a/tests/StringyTest.php b/tests/StringyTest.php index 97d5502..762af28 100644 --- a/tests/StringyTest.php +++ b/tests/StringyTest.php @@ -311,6 +311,8 @@ public function linesProvider() [['fòô', '', 'bàř'], "fòô\r\n\r\nbàř", 'UTF-8'], [['fòô', 'bàř', ''], "fòô\r\nbàř\r\n", 'UTF-8'], [['', 'fòô', 'bàř'], "\r\nfòô\r\nbàř", 'UTF-8'], + [['1111111111111111111'], '1111111111111111111', 'UTF-8'], + [['1111111111111111111111'], '1111111111111111111111', 'UTF-8'], ]; } /**