From 0f372f085a29a310f6c253e072a7d167f032ca16 Mon Sep 17 00:00:00 2001 From: basteyy Date: Sun, 17 Jan 2021 15:48:43 +0100 Subject: [PATCH] Fix php 8 related errors in the install, moving the version-informations into a single file --- bl-kernel/abstract/dbjson.class.php | 2 +- bl-kernel/boot/init.php | 5 ----- bl-kernel/boot/variables.php | 3 +++ bl-kernel/boot/version.php | 7 +++++++ install.php | 13 ++++++++++++- 5 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 bl-kernel/boot/version.php diff --git a/bl-kernel/abstract/dbjson.class.php b/bl-kernel/abstract/dbjson.class.php index f44f3658..a435007e 100644 --- a/bl-kernel/abstract/dbjson.class.php +++ b/bl-kernel/abstract/dbjson.class.php @@ -79,7 +79,7 @@ class dbJSON { if (file_put_contents($this->file, $data, LOCK_EX)) { return true; } else { - Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.', LOG_TYPE_ERROR); + Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.', \LOG_TYPE_ERROR); return false; } } diff --git a/bl-kernel/boot/init.php b/bl-kernel/boot/init.php index 6c67b67b..8bc6aa73 100644 --- a/bl-kernel/boot/init.php +++ b/bl-kernel/boot/init.php @@ -1,10 +1,5 @@ db['language-data']['native']; + $native = $t->db['language-data']['native'] ?? false; $locale = basename($file, '.json'); $tmp[$locale] = $native; }