danog / MadelineProto

Async PHP client API for the telegram MTProto protocol
https://docs.madelineproto.xyz
GNU Affero General Public License v3.0
2.74k stars 617 forks source link

This block breaks integration with Symfony #1509

Closed tebaly closed 2 months ago

tebaly commented 2 months ago

https://github.com/danog/MadelineProto/blob/886993a9e41e2c0fe386b78ff1950c6b2a9489d8/src/API.php#L215

This makes it impossible to debug the script and output data to the page

HOTFIX

            if (!$app) {
                return;
                die();
            }
danog commented 2 months ago

You should manually specify an API ID in the settings.

tebaly commented 2 months ago

The Symphony framework has its own graphical debugging/debugging/info system in the browser. This code breaks the system. Use die(); in libraries - antipattern. You use die(); at least two more times in your code