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

PHP Warning: count(): Parameter must be an array or an object that implements Countable in wp-content/themes/wporg-news-2021/functions.php:169 #374

Open
dd32 opened this issue May 3, 2022 · 0 comments

Comments

@dd32
Copy link
Member

dd32 commented May 3, 2022

count(): Parameter must be an array or an object that implements Countable
Source: POST https://wordpress.org/news/wp-admin/admin-ajax.php

Referer: https://wordpress.org/news/wp-admin/edit.php?s=people+of+wordpress&post_status=all&post_type=post&action=-1&m=0&cat=0&paged=1&action2=-1

File: wp-content/themes/wporg-news-2021/functions.php
Line: 169

Current user: ....
Filter stack: wp_ajax_inline-save, post_class

Current filter: post_class
- attached to priority 10: WordPressdotorg\Theme\News_2021\specify_post_classes

https://github.com/WordPress/wporg-news-2021/blob/trunk/source/wp-content/themes/wporg-news-2021/functions.php#L161-L174

Possibly the ! is_object( $wp_query ) check could be changed to empty( $wp_query->posts )

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