summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-06-28 14:52:55 -0400
committerjim-p <jimp@pfsense.org>2013-06-28 14:52:55 -0400
commitf09f3d6fb9034662cabe1c7e68843b118eb63bf9 (patch)
tree401730d83c097cc44d3bba567026c1fa8e577b4f /etc
parent1e7fa7cd9de3d6675f48279f9d4fbc346fc62a32 (diff)
downloadpfsense-f09f3d6fb9034662cabe1c7e68843b118eb63bf9.zip
pfsense-f09f3d6fb9034662cabe1c7e68843b118eb63bf9.tar.gz
If the script_name is blank, try another method to locate what our filename is so we don't log an empty script name.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/util.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index acd3fc3..54cf85b 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -1014,6 +1014,10 @@ function get_interface_list($mode = "active", $keyby = "physical", $vfaces = "")
function log_error($error) {
global $g;
$page = $_SERVER['SCRIPT_NAME'];
+ if (empty($page)) {
+ $files = get_included_files();
+ $page = basename($files[0]);
+ }
syslog(LOG_ERR, "$page: $error");
if ($g['debug'])
syslog(LOG_WARNING, var_dump(debug_backtrace()));
OpenPOWER on IntegriCloud