aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lib_rss.php')
-rw-r--r--lib/lib_rss.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 3cacc8390..602576256 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -548,15 +548,25 @@ function getNonStandardShortcuts($shortcuts) {
}
function errorMessage($errorTitle, $error = '') {
- // Prevent empty <h2> tags by checking if error isn't empty first
- if ('' !== $error) {
+ $errorTitle = htmlspecialchars($errorTitle, ENT_NOQUOTES, 'UTF-8');
+
+ $message = '';
+ $details = '';
+ // Prevent empty tags by checking if error isn not empty first
+ if ($error) {
$error = htmlspecialchars($error, ENT_NOQUOTES, 'UTF-8');
- $error = "<h2>{$error}</h2>";
+
+ // First line is the main message, other lines are the details
+ list($message, $details) = explode("\n", $error, 2);
+
+ $message = "<h2>{$message}</h2>";
+ $details = "<pre>{$details}</pre>";
}
- $errorTitle = htmlspecialchars($errorTitle, ENT_NOQUOTES, 'UTF-8');
+
return <<<MSG
<h1>{$errorTitle}</h1>
- {$error}
+ {$message}
+ {$details}
<h2>Check the logs</h2>
<p>FreshRSS logs are located in <code>./FreshRSS/data/users/*/log*.txt</code></p>
<p><em>N.B.:</em> A typical problem is wrong file permissions in the <code>./FreshRSS/data/</code> folder