From 330c09d2af685d2714e0d92a6f549c963622131c Mon Sep 17 00:00:00 2001 From: "Elias F." Date: Mon, 24 Nov 2025 15:06:58 +0100 Subject: [PATCH] Fix deprecation and config errors/warnings. The entire project should now work using only the php shell. --- application/config/config.development.php | 5 +++-- application/core/View.php | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/application/config/config.development.php b/application/config/config.development.php index b261f3a..fd599b1 100644 --- a/application/config/config.development.php +++ b/application/config/config.development.php @@ -33,7 +33,8 @@ return array( * This detects your URL/IP incl. sub-folder automatically. You can also deactivate auto-detection and provide the * URL manually. This should then look like 'http://192.168.33.44/' ! Note the slash in the end. */ - 'URL' => 'http://' . $_SERVER['HTTP_HOST'] . str_replace('public', '', dirname($_SERVER['SCRIPT_NAME'])), +// 'URL' => 'http://' . $_SERVER['HTTP_HOST'] . str_replace('public', '', dirname($_SERVER['SCRIPT_NAME'])), + 'URL' => 'http://localhost:8000/', // Use this for a local environment that doesnt run on a normal webserver. /** * Configuration for: Folders * Usually there's no reason to change this. @@ -62,7 +63,7 @@ return array( * DB_CHARSET The charset, necessary for security reasons. Check Database.php class for more info. */ 'DB_TYPE' => 'mysql', - 'DB_HOST' => 'localhost', + 'DB_HOST' => '127.0.0.1', 'DB_NAME' => 'huge', 'DB_USER' => 'root', 'DB_PASS' => 'root', diff --git a/application/core/View.php b/application/core/View.php index 435fe03..7de1c28 100644 --- a/application/core/View.php +++ b/application/core/View.php @@ -6,6 +6,17 @@ */ class View { + /* Resolve all the deprecation errors happening in the views, since they cant be disabled by error_reporting level in 8.4.*/ + public $redirect; + public $users; + public $notes; + public $user_name; + public $user_email; + public $user_gravatar_image_url; + public $user_avatar_file; + public $avatar_file_path; + public $user_account_type; + /** * simply includes (=shows) the view. this is done from the controller. In the controller, you usually say * $this->view->render('help/index'); to show (in this example) the view index.php in the folder help.