Skip to content

Conversation

christianwach
Copy link
Contributor

@christianwach christianwach commented Feb 6, 2024

Please see #5896 for details and code to replicate.

tl;dr In versions of PHP greater than 8.1.x, when WP_CLI::error() and WP_CLI::halt() are called in a separate command via WP_CLI::runcommand(), then PHP Deprecated notices are written to the logs. Passing an empty string is compatible with the signature of the Exception constructor and avoids the warnings.

Edit: since there are no functional changes in this PR, I haven't included tests.

@christianwach christianwach requested a review from a team as a code owner February 6, 2024 19:48
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