[wp-trac] [WordPress Trac] #42814: PHP 7.2 Warning: ...wp-includes/post-template.php on line 284
WordPress Trac
noreply at wordpress.org
Sat Jun 1 19:20:17 UTC 2019
#42814: PHP 7.2 Warning: ...wp-includes/post-template.php on line 284
-------------------------------------------------+-------------------------
Reporter: internetwerk | Owner:
| boonebgorges
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.2
Component: Posts, Post Types | Version: 4.5
Severity: normal | Resolution: fixed
Keywords: dev-feedback has-patch 2nd-opinion | Focuses:
php73 has-unit-tests |
-------------------------------------------------+-------------------------
Comment (by Abigailm):
This comment is also added for informational purposes:
I am also still seeing this error, now with a reference to line 310 (PHP
7.3, WP 5.2.1).
In my case it is tied to the enhanced search plugin, Relevanssi -- and
occurs if the plugin option for "Create custom search result snippets" is
enabled. This has been a consistent issue for me --- but I don't know
whether it should be seen as a problem with the wordpress core template or
with the coding of that particular feature of the plugin.
The error appears to be tied to this line of code in the plugin:
{{{
/** This filter is documented in wp-includes/post-template.php */
$content = apply_filters( 'the_content', $content );
}}}
So basically, the plugin is calling the apply_filters function that is
coded into post-template.php ... and somewhere along the line that
generates the PHP "implements Countable" warning in some (but not all) use
cases.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42814#comment:109>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list