[wp-trac] [WordPress Trac] #25690: PHP Fatal error: Call to undefined function wp_get_current_user() when upgrading to version 3.7
WordPress Trac
noreply at wordpress.org
Fri Oct 25 23:20:24 UTC 2013
#25690: PHP Fatal error: Call to undefined function wp_get_current_user() when
upgrading to version 3.7
-----------------------------+------------------------------
Reporter: ascom | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 3.6.1
Severity: blocker | Resolution:
Keywords: |
-----------------------------+------------------------------
Comment (by dd32):
The particular error is pretty common from plugins who run code on
inclusion, rather than on `plugins_loaded` or `init`.
Basically plugins that run code on inclusion are `_diong_it_wrong()` and
WILL break on a future release.
These plugins appear to be running `get_posts()` upon inclusion, which is
completely wrong to be doing (also, CPT's are not a great place to store
options...) which in turn needs to figure out user details - of which,
come from pluggable functions.. which are not included until after Plugins
are loaded.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25690#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list