diff options
author | Phil Davis <phil.davis@inf.org> | 2016-01-22 15:54:24 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2016-01-22 15:54:24 +0545 |
commit | eaa3fb69bbfa9163c8f67d69bc7b2360230a5044 (patch) | |
tree | e29806026df03327c8dc28c9db09613855153116 /src | |
parent | c40fbe6d09c15c367fd900ff20e88b4dedb6bd4e (diff) | |
download | pfsense-eaa3fb69bbfa9163c8f67d69bc7b2360230a5044.zip pfsense-eaa3fb69bbfa9163c8f67d69bc7b2360230a5044.tar.gz |
Cleanup crash_reporter Submit checks
When looking at this earlier I never paid attention to the left side of each of these conditions. It is pretty dumb to gettext($_POST['Submit']) and then compare it to gettext("Yes") !!!
This cleans it up so it does just an ordinary comparison - works fine.
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/crash_reporter.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/local/www/crash_reporter.php b/src/usr/local/www/crash_reporter.php index f4db694..6cd5adc 100644 --- a/src/usr/local/www/crash_reporter.php +++ b/src/usr/local/www/crash_reporter.php @@ -99,7 +99,7 @@ $crash_report_header .= "\nCrash report details:\n"; exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors); ?> <?php - if (gettext($_POST['Submit']) == gettext("Yes")) { + if ($_POST['Submit'] == "Yes") { echo gettext("Processing..."); if (!is_dir("/var/crash")) { mkdir("/var/crash", 0750, true); @@ -126,7 +126,7 @@ exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors); } else { echo gettext("Could not find any crash files."); } - } else if (gettext($_POST['Submit']) == gettext("No")) { + } else if ($_POST['Submit'] == "No") { array_map('unlink', glob("/var/crash/*")); // Erase the contents of the PHP error log fclose(fopen("/tmp/PHP_errors.log", 'w')); |