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

Fix undefined index/array key warning with isset #5351

Closed
wants to merge 1 commit into from

Conversation

jacobcassidy
Copy link

Added an if statement with isset() to confirm that $angle_units[ $unit ] is valid before assigning it to $factor to avoid outputting a PHP warning.

Trac ticket: https://core.trac.wordpress.org/ticket/59496

Copy link

@ajlende ajlende left a comment

Choose a reason for hiding this comment

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

Looks good to me. The logic tracks with the original JS function. 👍

@swissspidy swissspidy closed this Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants