From 1124c73064545ec04420f534a77db930a90c9693 Mon Sep 17 00:00:00 2001 From: wyd621 Date: Wed, 30 Oct 2013 00:02:15 +0000 Subject: [PATCH] * adjust for saveError. --- framework/router.class.php | 6 ++++++ 1 file changed, 6 insertions(+) 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');