aboutsummaryrefslogtreecommitdiff
path: root/lib/Exceptions.php
diff options
context:
space:
mode:
authorGravatar triatic <42704418+triatic@users.noreply.github.com> 2018-11-26 17:33:51 +0000
committerGravatar LogMANOriginal <LogMANOriginal@users.noreply.github.com> 2018-11-26 18:33:51 +0100
commit263e8872eaa828246b248905d393a6befec1d556 (patch)
treeebbd3fa41d3a5b6298b06abc955e99372f28ddcc /lib/Exceptions.php
parent6e9c188a7243c5777c8ddfea44785ce1920a3466 (diff)
downloadrss-bridge-263e8872eaa828246b248905d393a6befec1d556.tar.gz
rss-bridge-263e8872eaa828246b248905d393a6befec1d556.tar.zst
rss-bridge-263e8872eaa828246b248905d393a6befec1d556.zip
core: Don't use server variables in CLI mode (#939)
Diffstat (limited to 'lib/Exceptions.php')
-rw-r--r--lib/Exceptions.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Exceptions.php b/lib/Exceptions.php
index 4250f9f9..ac452d02 100644
--- a/lib/Exceptions.php
+++ b/lib/Exceptions.php
@@ -77,7 +77,7 @@ function buildBridgeException($e, $bridge){
$body = 'Error message: `'
. $e->getMessage()
. "`\nQuery string: `"
- . $_SERVER['QUERY_STRING']
+ . (isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '')
. "`\nVersion: `"
. Configuration::getVersion()
. '`';
@@ -116,7 +116,8 @@ function buildTransformException($e, $bridge){
$body = 'Error message: `'
. $e->getMessage()
. "`\nQuery string: `"
- . $_SERVER['QUERY_STRING'] . '`';
+ . (isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '')
+ . '`';
$link = buildGitHubIssueQuery($title, $body, 'bug report', $bridge->getMaintainer());
$header = buildHeader($e, $bridge);