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

Simply use !empty() instead of isset() && !empty() #116

Open
chludwig opened this issue Jan 14, 2025 · 0 comments
Open

Simply use !empty() instead of isset() && !empty() #116

chludwig opened this issue Jan 14, 2025 · 0 comments

Comments

@chludwig
Copy link

In v3.0.1 you added an isset() check that is not needed here

if( isset( $args['status'] ) && !empty( $args['status'] ) ) {

See https://www.php.net/manual/en/function.empty.php

A variable is considered empty if it does not exist or if its value equals [false]

@chludwig chludwig changed the title Simply use ! empty() instead of isset() && ! empty() Simply use !empty() instead of isset() && !empty() Jan 14, 2025
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

No branches or pull requests

1 participant