Commit 4d8825e3 authored by Franco Fichtner's avatar Franco Fichtner

crash reporter: fix a crash report ;)

parent 27f350c2
...@@ -111,10 +111,15 @@ if (isset($_POST['Submit'])) { ...@@ -111,10 +111,15 @@ if (isset($_POST['Submit'])) {
@copy('/var/run/dmesg.boot', '/var/crash/dmesg.boot'); @copy('/var/run/dmesg.boot', '/var/crash/dmesg.boot');
exec('/usr/bin/gzip /var/crash/*'); exec('/usr/bin/gzip /var/crash/*');
$files_to_upload = glob('/var/crash/*'); $files_to_upload = glob('/var/crash/*');
$resp = upload_crash_report($files_to_upload, $user_agent); upload_crash_report($files_to_upload, $user_agent);
array_map('unlink', $files_to_upload); foreach ($files_to_upload as $file_to_upload) {
@unlink($file_to_upload);
}
} elseif ($_POST['Submit'] == 'no') { } elseif ($_POST['Submit'] == 'no') {
array_map('unlink', glob('/var/crash/*')); $files_to_upload = glob('/var/crash/*');
foreach ($files_to_upload as $file_to_upload) {
@unlink($file_to_upload);
}
@unlink('/tmp/PHP_errors.log'); @unlink('/tmp/PHP_errors.log');
} elseif ($_POST['Submit'] == 'new') { } elseif ($_POST['Submit'] == 'new') {
/* force a crash report generation */ /* force a crash report generation */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment