Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Fix php notice on exception if exception code is missing

givanz1a2ad53dc720
diff --git a/system/core/startup.php b/system/core/startup.php
index db4a062..3c957a5 100755
--- a/system/core/startup.php
+++ b/system/core/startup.php
@@ -215,7 +215,7 @@ function exceptionToArray($exception, $file = false) {
$line = $lineNo;
$code = '';
- if ($file && ($codeLines = file($file))) {
+ if ($file && ($codeLines = file($file)) && isset($codeLines[$lineNo])) {
$codeLines[$lineNo] = preg_replace("/\n$/","\t // <==\n", $codeLines[$lineNo]);
$lines = array_slice($codeLines, $lineNo - 7, 14);
$line = implode("\n", array_slice($codeLines, $lineNo, 1));
@@ -360,8 +360,6 @@ function start() {
Plugins :: loadPlugins(SITE_ID);
}
- //define('DIR_THEME', DIR_ROOT . 'public/themes/'. THEME .'/');
-
FrontController::dispatch();
} else {
define('SITE_URL', $_SERVER['HTTP_HOST'] ?? 'localhost');