[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
Sat Oct 26 03:02:31 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: 3.7.1
Component: Upgrade/Install | Version: 3.7
Severity: blocker | Resolution:
Keywords: |
-----------------------------+--------------------
Comment (by nacin):
We don't need to revert everything in [25669]. Let's figure out what is
possible to call prior to pluggable being loaded.
Looks to me like wp_insert_attachment(), wp_insert_post(),
get_posts_by_author_sql() (which is a helper), and WP_Query itself.
I think we should patch get_current_user_id() to simply return 0 when that
function does not exist. I don't love the idea of slowing down that
function, but I don't think we use it extensively (it's not like calling
it in a loop is going to be desired, the value doesn't change). At worst
we can convert it to using $current_user directly, though I think we
should just add a function_exists() check and call it a day. What a mess.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25690#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list