diff --git a/composer.json b/composer.json index 58d4bdc87..3b7a66aa3 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "rollbar/rollbar": "dev-master", "ext-mbstring": "*", "ext-curl": "*", + "ext-sockets": "*", "ext-xml": "*" }, diff --git a/src/danog/MadelineProto/TL/TL.php b/src/danog/MadelineProto/TL/TL.php index 234b68c6a..fb9c97781 100644 --- a/src/danog/MadelineProto/TL/TL.php +++ b/src/danog/MadelineProto/TL/TL.php @@ -43,6 +43,7 @@ trait TL $class = null; $dparams = []; foreach ($tl_file as $line) { + $line = rtrim($line); if (preg_match('|^//@|', $line)) { $list = explode(' @', str_replace('//', ' ', $line)); foreach ($list as $elem) { @@ -83,7 +84,7 @@ trait TL $type = 'constructors'; continue; } - if (preg_match('|^===\d*===$|', $line)) { + if (preg_match('|^===\d*===|', $line)) { $layer = (int) preg_replace('|\D*|', '', $line); continue; }