[wp-trac] [WordPress Trac] #55442: count(): Parameter must be an array or an object that implements Countable in /var/www/html/wp-includes/post-template.php on line 319
WordPress Trac
noreply at wordpress.org
Tue Mar 22 22:40:48 UTC 2022
#55442: count(): Parameter must be an array or an object that implements Countable
in /var/www/html/wp-includes/post-template.php on line 319
--------------------------+------------------------------
Reporter: davidscpl | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by audrasjb):
Hello and welcome to WordPress Trac @davidscpl,
I tried to reproduce the issue using the following steps, but it didn't
succeed.
- Using a fresh WordPress 5.9.2 installation
- Enable WP_DEBUG/WP_DEBUG_DISPLAY constants
- In one of the Bundled Themes, open the 404.php template and add the
following code:
{{{
global $post;
var_export( $post );
echo get_the_content();
}}}
It echoes `NULL` (line 2). **No PHP warning.**
Could you please provide more details on how we can reproduce the issue?
Thanks!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55442#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list