[wp-trac] [WordPress Trac] #5265: Possible to get "call to undefined
function" when activating a plugin
WordPress Trac
wp-trac at lists.automattic.com
Sat Oct 27 08:10:25 GMT 2007
#5265: Possible to get "call to undefined function" when activating a plugin
----------------------------+-----------------------------------------------
Reporter: Viper007Bond | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.3.2
Component: Administration | Version: 2.3
Severity: blocker | Keywords: needs-patch
----------------------------+-----------------------------------------------
Okay, so I'm writing a plugin and here's the code I have so far:
http://wordpress.pastebin.com/f3ea57b78
When activating the plugin from the plugins page, I get the following
error:
{{{
Fatal error: Call to undefined function wp_get_current_user() in [...]\wp-
includes\capabilities.php on line 446
}}}
No, it's not in a blue box or anything -- it's just that error message. I
have to go and rename or delete the plugin file to get my admin area back.
So two issues here:
A) What's causing this PHP error?
B) Why isn't it being caught by the box and dying gracefully? (I assume
it's because the error isn't in the plugin's file.)
--
Ticket URL: <http://trac.wordpress.org/ticket/5265>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list