aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/fn/fn.php5
-rw-r--r--app/view/templates/layout.php3
2 files changed, 7 insertions, 1 deletions
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 '<link rel="stylesheet" href="' . Wcms\Model::csspath() . Wcms\Config::interfacecss() . '">';
}
- if (!empty(Wcms\Config::sentrydsn())) {
+ if (isreportingerrors()) {
?>
<script>
const sentrydsn = '<?= Wcms\Config::sentrydsn() ?>';
@@ -25,6 +25,7 @@
const url = '<?= Wcms\Config::url() ?>';
const basepath = '<?= Wcms\Config::basepath() ?>';
</script>
+ <script src="https://browser.sentry-cdn.com/5.9.0/bundle.min.js"></script>
<script src="<?= Wcms\Model::jspath() ?>sentry.bundle.js"></script>
<?php } ?>
</head>