diff --git a/framework/router.class.php b/framework/router.class.php index 0b3e5371e5..4c904555c8 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -408,7 +408,7 @@ class router { $this->appRoot = realpath($appRoot) . $this->pathFix; } - if(!is_dir($this->appRoot)) $this->triggerError("The app you call not noud in {$this->appRoot}", __FILE__, __LINE__, $exit = true); + if(!is_dir($this->appRoot)) $this->triggerError("The app you call not found in {$this->appRoot}", __FILE__, __LINE__, $exit = true); } /** @@ -1588,6 +1588,9 @@ class router */ public function saveError($level, $message, $file, $line) { + /* Skip the error: Redefining already defined constructor. */ + if(strpos($message, 'Redefining') !== false) return true; + /* Set the error info. */ $errorLog = "\n" . date('H:i:s') . " $message in $file on line $line "; $errorLog .= "when visiting " . $this->getURI() . "\n"; @@ -1603,6 +1606,18 @@ class router $fh = @fopen($errorFile, 'a'); if($fh) fwrite($fh, strip_tags($errorLog)) && fclose($fh); + /* If the debug > 1, show warning, notice error. */ + if($level == E_NOTICE or $level == E_WARNING or $level == E_STRICT or $level == 8192) // 8192: E_DEPRECATED + { + if(!empty($this->config->debug) and $this->config->debug > 1) + { + $cmd = "vim +$line $file"; + $size = strlen($cmd); + echo "
$message: "; + echo ""; + } + } + /* If error level is serious, die. */ if($level == E_ERROR or $level == E_PARSE or $level == E_CORE_ERROR or $level == E_COMPILE_ERROR or $level == E_USER_ERROR) { diff --git a/www/theme/default/style.css b/www/theme/default/style.css index cf2da4544d..efa29c38ba 100644 --- a/www/theme/default/style.css +++ b/www/theme/default/style.css @@ -663,3 +663,6 @@ table.data-table td:last-child{padding-right: 20px;} .link-button a{ color:#036; font-weight:normal; font-size:14px;padding: 3px 4px;} .link-button a i{font-size: 18px;} .link-button a:hover {color:#000;} + +.alert{padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 3px; background-color: #f1f1f1; border-color: #e4e4e4; color: #333;} +.alert-danger{background-color: #ffe6e5; border-color: #ffccd3; color: #d2322d;}