You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Might be related to, or a dupe of, #41. Looks like this is either a bug in the way the plugin uses the Rollbar PHP library.
In vendor\rollbar\rollbar\src\Config.php::setAccessToken() you have
if (isset($_ENV['ROLLBAR_ACCESS_TOKEN']) && !isset($config['access_token'])) {
$config['access_token'] = $_ENV['ROLLBAR_ACCESS_TOKEN'];
}
but in practice, $config['access_token'] is always set by the plugin, although it might be "". Thus you're unable to use $_ENV to set the token.
You can change this to
if (!empty($_ENV['ROLLBAR_ACCESS_TOKEN'])) {
$config['access_token'] = $_ENV['ROLLBAR_ACCESS_TOKEN'];
}
but it might be safer to change the logic upstream in the plugin. I would also note that a more common WordPress pattern is to define strings like these in wp-config.php, rather than using $_ENV, so having the plugin support something like
define('ROLLBAR_ACCESS_TOKEN', '...');
would be ideal.
The text was updated successfully, but these errors were encountered:
Might be related to, or a dupe of, #41. Looks like this is either a bug in the way the plugin uses the Rollbar PHP library.
In
vendor\rollbar\rollbar\src\Config.php::setAccessToken()
you havebut in practice,
$config['access_token']
is always set by the plugin, although it might be "". Thus you're unable to use$_ENV
to set the token.You can change this to
but it might be safer to change the logic upstream in the plugin. I would also note that a more common WordPress pattern is to define strings like these in
wp-config.php
, rather than using$_ENV
, so having the plugin support something likewould be ideal.
The text was updated successfully, but these errors were encountered: