diff --git a/framework/router.class.php b/framework/router.class.php index 755a89d0cf..8c02f4c232 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -1592,6 +1592,12 @@ class router $errorLog = "\n" . date('H:i:s') . " $message in $file on line $line "; $errorLog .= "when visiting " . $this->getURI() . "\n"; + $serverAddr = explode('.', $_SERVER['SERVER_ADDR']); + if(!($serverAddr[0] == 10 or ($serverAddr[0] == 172 and $serverAddr[1] >= 16 and $serverAddr[1] <= 131) or ($serverAddr[0] == 192 and $serverAddr[1] == '168'))) + { + $errorLog = str_replace($this->getBasePath(), '', $errorLog); + } + /* Save to log file. */ $errorFile = $this->getLogRoot() . 'php.' . date('Ymd') . '.log'; $fh = @fopen($errorFile, 'a');