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

$bugsnagWordpress variable not available on CLI scripts #23

Closed nviitala closed 5 years ago

nviitala commented 7 years ago

Expected behavior

$bugsnagWordpress to be Bugsnag_Wordpress object

Observed behavior

$bugsnagWordpress is null

Steps to reproduce

Run wp-cli's eval-file ( https://developer.wordpress.org/cli/commands/eval-file/ ) to file which has a $bugsnagWordpress variable

Version

1.3.0

Additional information

Suggested fix: Add: global $bugsnagWordpress; before: $bugsnagWordpress = new Bugsnag_Wordpress(); On bugsnag.php

Cawllec commented 6 years ago

Hi @nviitala, thanks for the feedback, sorry it's taken so long to get to this. We'll have a look at making that change.

tomlongridge commented 5 years ago

This will be fixed in #40