bugsnag / bugsnag-wordpress

BugSnag error monitoring for WordPress sites
http://wordpress.org/plugins/bugsnag/
GNU General Public License v2.0
20 stars 15 forks source link

Method setReleaseStage does not exist on Bugsnag_Wordpress or Bugsnag_Client #42

Closed simplenotezy closed 4 years ago

simplenotezy commented 5 years ago

Expected behavior

I am calling $bugsnagWordpress->setReleaseStage( below. I would expect it to work.

  if(isset($bugsnagWordpress) && !is_null($bugsnagWordpress)) {
    $bugsnagWordpress->setReleaseStage(get_stage_environment());
  }

Observed behavior

I am receiving error:

Method setReleaseStage does not exist on Bugsnag_Wordpress or Bugsnag_Client

How come? Obviously $bugsnagWordpress exists.

mattdyoung commented 5 years ago

Hi @simplenotezy

I managed to reproduce this behaviour by activating the Bugsnag plugin, but then clearing the Bugsnag API Key field under the plugin settings. Can you check the plugin settings and confirm that you've correctly set your project's API key?

It appears that if you activate the plugin but don't set the API key, the Bugsnag client doesn't get initialized and the reflection call fails resulting in this error.

abigailbramble commented 4 years ago

@simplenotezy Closing this as we haven't had a response. Please contact Bugsnag support if you're still having issues.