[wp-hackers] Invisible Errors on Activation

Austin Matzko if.website at gmail.com
Fri Jun 13 16:47:44 GMT 2008

On Thu, Jun 12, 2008 at 1:42 PM, Rich Christiansen
<warproof at warproof.com> wrote:
> My latest plugin
> (http://wordpress.org/extend/plugins/featurific-for-wordpress/) performs a
> bunch of initialization during activation.  However, if the activation
> generates PHP errors (e.g. file not found, etc.), they are not reported to
> the user.  The problem is that I know that errors are being generated.  If I
> call the activation method from another method, the PHP errors are
> successfully reported.
> What's wrong?  Is this the default behavior of Wordpress?  And if so, how
> can I work around it?

The function activate_plugin, defined in wp-admin/includes/plugin.php,
uses output buffering to check for fatal errors upon activation.  You
can comment out the call to output buffering functions there to see
the errors.

More information about the wp-hackers mailing list