From c1843c0a2ef49de3d2030398f5c14549cc1791ab Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Fri, 15 Nov 2019 15:57:46 +0100 Subject: feat: load Sentry browser as an external script - better way to check if we need to report errors in PHP - fix make file $(js_bundles) dependencies (add webpack conf) - update sentry-browser sdk and move it to dev requirements --- app/fn/fn.php | 5 +++++ app/view/templates/layout.php | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/fn/fn.php b/app/fn/fn.php index f96b8ba..ccccfb9 100644 --- a/app/fn/fn.php +++ b/app/fn/fn.php @@ -72,6 +72,11 @@ function idclean(string $input) return $input; } +function isreportingerrors() +{ + return function_exists('Sentry\init') && !empty(Wcms\Config::sentrydsn()); +} + function getversion() { diff --git a/app/view/templates/layout.php b/app/view/templates/layout.php index ef28748..9259fda 100644 --- a/app/view/templates/layout.php +++ b/app/view/templates/layout.php @@ -17,7 +17,7 @@ if (!empty(Wcms\Config::interfacecss())) { echo ''; } - if (!empty(Wcms\Config::sentrydsn())) { + if (isreportingerrors()) { ?> + -- cgit v1.2.3