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

compact() now issues an E_WARNING error.(PHP8.0) #2776

Merged
merged 2 commits into from
Sep 19, 2023

Conversation

o0h
Copy link
Contributor

@o0h o0h commented Sep 19, 2023

Since PHP 8.0: "A number of notices have been converted into warnings"

Usually, in the PHP manual, even if the error level is raised from E_NOTICE to E_WARNING, a changelog isn't kept within individual function pages.
However, on the compact() page, there's already an entry in the changelog regarding the previous change to 'now issues an E_NOTICE'. Therefore, I believe that adding a note explicitly indicating the recent change in the issued error might prevent confusion.

Since PHP 8.0: "A number of notices have been converted into warnings"

related to:
https://www.php.net/manual/en/migration80.incompatible.php
php/php-src@c37a1cd
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, could you just add the missing markup to the E_WANRING and E_NOTICE constants?

reference/array/functions/compact.xml Outdated Show resolved Hide resolved
reference/array/functions/compact.xml Outdated Show resolved Hide resolved
@o0h
Copy link
Contributor Author

o0h commented Sep 19, 2023

Thanks! I corrected the markup.

@Girgias Girgias merged commit e311803 into php:master Sep 19, 2023
2 checks passed
@o0h o0h deleted the compact-issues-an-e-warning branch September 19, 2023 17:42
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