Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update trigger_error() PHP 8.4 deprecation #1295

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

SQKo
Copy link
Member

@SQKo SQKo commented Feb 23, 2025

now it throws a RuntimeException instead (althought i dont want people to catch it)

Credits user VIRUXE in discord

anyhow: Deprecated: Passing E_USER_ERROR to trigger_error() is deprecated since 8.4, throw an exception or call exit with a string message instead in ...vendor\team-reflex\discord-php\src\Discord\Discord.php on line 356

now it throws a RuntimeException instead
@Exanlv
Copy link
Collaborator

Exanlv commented Feb 25, 2025

If you don't want people catching it, could also change it to something along these lines:

echo 'My error', PHP_EOL;
exit(1);

Can't use catch, and gives you a non-zero exit code.

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.

3 participants