[wp-trac] [WordPress Trac] #26775: Fatal error in wp_reset_postdata()
WordPress Trac
noreply at wordpress.org
Sun Jan 5 14:16:49 UTC 2014
#26775: Fatal error in wp_reset_postdata()
----------------------------+----------------------------------------
Reporter: SergeyBiryukov | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.9
Component: Query | Version: 3.7
Severity: normal | Keywords: has-patch needs-unit-tests
----------------------------+----------------------------------------
[25601] introduced a
[https://www.google.com/search?q="Call%20to%20a%20member%20function%20reset_postdata()%20on%20a
%20non-object" fatal error] when calling `wp_reset_query()` or
`wp_reset_postdata()` without a valid `$wp_query` global:
{{{
Fatal error: Call to a member function reset_postdata() on a non-object in
wp-includes/query.php on line 118
}}}
We should probably add a `_doing_it_wrong()` message in there, but at
least let's fix the fatal error.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26775>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list