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

post tags array safety checks #54

Open
kyrahabattoir opened this issue Feb 11, 2021 · 1 comment
Open

post tags array safety checks #54

kyrahabattoir opened this issue Feb 11, 2021 · 1 comment

Comments

@kyrahabattoir
Copy link

Just close this if i'm wrong but...

at

shouldn't

        $post_tags = get_the_tags($id);
        if (sizeof($post_tags) > 0) {
            if ($post_tags) {

be instead

        $post_tags = get_the_tags($id);
        if ($post_tags) {
            if (sizeof($post_tags) > 0) {

That is, check if post_tags is not null and THEN check its length rather than the other way around?

@simonfrey
Copy link
Owner

Did you test it how it behaves with you change? If not please do so and then we know best if it still works as intended :D

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

2 participants