aboutsummaryrefslogtreecommitdiff
path: root/app/fn
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-11-15 19:42:10 +0100
committervincent-peugnet <v.peugnet@free.fr>2019-11-15 19:42:10 +0100
commit7741585fd4658428a8bd9e345604ab297fa281dd (patch)
tree927fb050133f5f5a57b7bd80d724fde8394eade9 /app/fn
parentdc041bbd71d1b9d6cfe189f2449a9ee0e9063708 (diff)
parent5c0035fe37cdec5f7927c3213365285a7fd4d51b (diff)
downloadwcms-7741585fd4658428a8bd9e345604ab297fa281dd.tar.gz
wcms-7741585fd4658428a8bd9e345604ab297fa281dd.zip
Merge branch 'integrate-sentry-sdk' of https://github.com/n-peugnet/wcms into n-peugnet-integrate-sentry-sdk
Diffstat (limited to 'app/fn')
-rw-r--r--app/fn/fn.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/fn/fn.php b/app/fn/fn.php
index f462d2d..ccccfb9 100644
--- a/app/fn/fn.php
+++ b/app/fn/fn.php
@@ -72,11 +72,16 @@ function idclean(string $input)
return $input;
}
+function isreportingerrors()
+{
+ return function_exists('Sentry\init') && !empty(Wcms\Config::sentrydsn());
+}
+
function getversion()
{
if(file_exists('VERSION')) {
- $version = file_get_contents('VERSION');
+ $version = trim(file_get_contents('VERSION'));
} else {
$version = 'unknown';
}