From 7eefd54b81f7d8dce92e7c2ab563f67e8504b62e Mon Sep 17 00:00:00 2001 From: Fabian Franz Date: Mon, 14 Sep 2015 13:31:15 +0200 Subject: [PATCH] move before description and move of newline --- src/www/crash_reporter.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/www/crash_reporter.php b/src/www/crash_reporter.php index 98ad8a7a7..2b9286caa 100644 --- a/src/www/crash_reporter.php +++ b/src/www/crash_reporter.php @@ -91,14 +91,14 @@ if (isset($_POST['Submit'])) { if (!empty($email)) { $crash_report_header .= "Email {$email}\n"; } + if (isset($_SERVER["HTTP_USER_AGENT"])) + { + $crash_report_header .= "User Agent " . $_SERVER["HTTP_USER_AGENT"] . "\n"; + } $desc = trim($_POST['Desc']); if (!empty($desc)) { $crash_report_header .= "Description\n\n{$desc}"; } - if (isset($_SERVER["HTTP_USER_AGENT"])) - { - $crash_report_header .= "User Agent\n\n" . $_SERVER["HTTP_USER_AGENT"]; - } file_put_contents('/var/crash/crashreport_header.txt', $crash_report_header); @rename('/tmp/PHP_errors.log', '/var/crash/PHP_errors.log'); @copy('/var/run/dmesg.boot', '/var/crash/dmesg.boot');