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

Feature/php 8.4 fix trigger user error #25

Merged

Conversation

Alkarex
Copy link
Member

@Alkarex Alkarex commented Sep 14, 2024

PHP 8.4 deprecates passing `E_USER_ERROR` to `trigger_error()`, with the recommendation being to replace these type of calls with either an Exception or an `exit` statement.

This commit fixes an instance found in the autoloader by changing it to a call to `exit`, which considering it is an error related to the autoloader not being registered seems the most appropriate.

Ref: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
PHP 8.4 deprecates passing `E_USER_ERROR` to `trigger_error()`, with the recommendation being to replace these type of calls with either an Exception or an `exit` statement.

This commit fixes another instance of this issue. In this case, the call to `trigger_error()` is replaced by throwing a generic `SimplePie\Exception` for the same.

Ref: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
PHP 8.4 deprecates passing `E_USER_ERROR` to `trigger_error()`, with the recommendation being to replace these type of calls with either an Exception or an `exit` statement.

This commit fixes the last instance of this issue. In this case, the call to `trigger_error()` is also replaced by throwing a generic `SimplePie\Exception` for the same.

Ref: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
... the call to `trigger_error()` would now throw a PHP notice, but with the `die()` after it, with still kill the program anyhow, so we may as well, exit with the error message and remove the `trigger_error()` function call completely.
@Alkarex Alkarex merged commit 1cabd55 into FreshRSS:freshrss Sep 14, 2024
9 checks passed
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.

2 participants