diff options
author | jim-p <jimp@pfsense.org> | 2013-06-28 14:52:55 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-06-28 14:52:55 -0400 |
commit | f09f3d6fb9034662cabe1c7e68843b118eb63bf9 (patch) | |
tree | 401730d83c097cc44d3bba567026c1fa8e577b4f /etc/inc | |
parent | 1e7fa7cd9de3d6675f48279f9d4fbc346fc62a32 (diff) | |
download | pfsense-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/inc')
-rw-r--r-- | etc/inc/util.inc | 4 |
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())); |