1
0
mirror of https://github.com/beestat/app.git synced 2025-08-11 09:13:50 -04:00

Condition Sentry reporting on whether or not the configuration is present.

Better for people forking the project.
This commit is contained in:
Jon Ziebell 2020-02-08 14:06:34 -05:00
parent 882dec840e
commit 73139b47a8

View File

@ -712,7 +712,11 @@ final class cora {
// Send data to Sentry for error logging. // Send data to Sentry for error logging.
// https://docs.sentry.io/development/sdk-dev/event-payloads/ // https://docs.sentry.io/development/sdk-dev/event-payloads/
if ($reportable === true && $this->setting->get('environment') === 'live') { if (
$reportable === true &&
$this->setting->get('sentry_key') !== null &&
$this->setting->get('sentry_project_id') !== null
) {
$data = [ $data = [
'event_id' => str_replace('-', '', exec('uuidgen -r')), 'event_id' => str_replace('-', '', exec('uuidgen -r')),
'timestamp' => date('c'), 'timestamp' => date('c'),