From 107f6d99eb45d303fd25d121a69b200e4f4f147b Mon Sep 17 00:00:00 2001 From: azett Date: Sat, 28 Oct 2023 13:56:05 +0200 Subject: [PATCH] Added missing properties to fix "Dynamic properties are deprecated" errors under PHP 8.2 --- admin/panels/entry/admin.entry.write.php | 2 ++ admin/panels/maintain/admin.maintain.php | 1 + admin/panels/plugin/admin.plugin.php | 4 ++++ admin/panels/static/admin.static.delete.php | 1 + fp-includes/core/core.bplustree.class.php | 16 +++++++++++----- fp-includes/core/core.entry.php | 2 ++ fp-includes/core/core.fpdb.class.php | 7 +++++++ fp-plugins/bbcode/inc/stringparser.class.php | 2 ++ .../bbcode/inc/stringparser_bbcode.class.php | 7 +++++++ fp-plugins/blockparser/plugin.blockparser.php | 6 ++++-- fp-plugins/commentcenter/inc/admin.php | 2 ++ 11 files changed, 43 insertions(+), 7 deletions(-) diff --git a/admin/panels/entry/admin.entry.write.php b/admin/panels/entry/admin.entry.write.php index d75ed49..4bc3861 100755 --- a/admin/panels/entry/admin.entry.write.php +++ b/admin/panels/entry/admin.entry.write.php @@ -40,6 +40,8 @@ class admin_entry_write extends AdminPanelActionValidated { ); var $draft = false; + + var $id = null; function _makePreview($arr, $id = null) { if (!$id) { diff --git a/admin/panels/maintain/admin.maintain.php b/admin/panels/maintain/admin.maintain.php index ba2f529..44dd953 100755 --- a/admin/panels/maintain/admin.maintain.php +++ b/admin/panels/maintain/admin.maintain.php @@ -37,6 +37,7 @@ class tpl_deleter extends fs_filelister { class s_entry_crawler extends fs_filelister { var $_directory = CONTENT_DIR; + var $index; function __construct() { $this->index = entry_init(); diff --git a/admin/panels/plugin/admin.plugin.php b/admin/panels/plugin/admin.plugin.php index e29d4df..f059cf2 100644 --- a/admin/panels/plugin/admin.plugin.php +++ b/admin/panels/plugin/admin.plugin.php @@ -40,6 +40,10 @@ class admin_plugin_default extends AdminPanelAction { ); var $errors = array(); + + var $pluginid; + + var $fp_plugins; function setup() { $this->pluginid = isset($_GET ['plugin']) ? $_GET ['plugin'] : null; diff --git a/admin/panels/static/admin.static.delete.php b/admin/panels/static/admin.static.delete.php index b8861da..dbe0dd5 100755 --- a/admin/panels/static/admin.static.delete.php +++ b/admin/panels/static/admin.static.delete.php @@ -17,6 +17,7 @@ class admin_static_delete extends AdminPanelAction { var $events = array('delete', 'cancel'); + var $page; function setup() { $this->page = @($_REQUEST['page']); diff --git a/fp-includes/core/core.bplustree.class.php b/fp-includes/core/core.bplustree.class.php index c8c2b67..2c2e928 100755 --- a/fp-includes/core/core.bplustree.class.php +++ b/fp-includes/core/core.bplustree.class.php @@ -542,6 +542,8 @@ class BPlusTree_Node { * @var int number of valid keys in $keys */ var $validkeys; + + var $storage; /** * constructor @@ -1558,6 +1560,8 @@ class BPlusTree { * @var bool true if fifo is enabled */ var $fifo_enabled = false; + + var $file = null; /** * constructor @@ -2376,14 +2380,14 @@ class BPlusTree { class BPlusWalker { var $tree; - var $keylower; - var $includelower; - var $keyupper; - var $includeupper; + var $startnode; + var $node; + var $node_index; + var $valid; function __construct(&$tree, &$keylower, $includelower = null, $keyupper = null, $includeupper = null) { $this->tree = & $tree; @@ -2572,8 +2576,10 @@ class caching_BPT extends BPlusTree { class SBPlusTree extends BPlusTree { var $maxstring; - var $stringfile; + var $nodesize; + var $keylen; + var $position; function __construct($infile, $stringfile, $maxstring = 256, $pos = null, $nodesize = null, $keylen = null) { parent::__construct($infile, $pos, $nodesize, $keylen); diff --git a/fp-includes/core/core.entry.php b/fp-includes/core/core.entry.php index 64777cf..0f93225 100755 --- a/fp-includes/core/core.entry.php +++ b/fp-includes/core/core.entry.php @@ -38,6 +38,8 @@ class entry_index { var $_keysize = 12; var $_lock_file = null; + + var $catlist = null; function __construct() { $this->_lock_file = CACHE_DIR . 'bpt.lock'; diff --git a/fp-includes/core/core.fpdb.class.php b/fp-includes/core/core.fpdb.class.php index a5bb7c0..7530d27 100644 --- a/fp-includes/core/core.fpdb.class.php +++ b/fp-includes/core/core.fpdb.class.php @@ -159,6 +159,13 @@ class FPDB_Query { var $secondary_idx = null; var $walker = null; + + var $prevkey = null; + + var $nextkey = null; + + var $comments = null; + function __construct($params, $ID) { global $current_query; diff --git a/fp-plugins/bbcode/inc/stringparser.class.php b/fp-plugins/bbcode/inc/stringparser.class.php index 1f1fd98..2230b03 100755 --- a/fp-plugins/bbcode/inc/stringparser.class.php +++ b/fp-plugins/bbcode/inc/stringparser.class.php @@ -208,6 +208,8 @@ class StringParser { * @var bool */ var $_recentlyReparsed = false; + + var $_output; /** * Constructor diff --git a/fp-plugins/bbcode/inc/stringparser_bbcode.class.php b/fp-plugins/bbcode/inc/stringparser_bbcode.class.php index d5262e7..3fac19e 100755 --- a/fp-plugins/bbcode/inc/stringparser_bbcode.class.php +++ b/fp-plugins/bbcode/inc/stringparser_bbcode.class.php @@ -150,6 +150,11 @@ class StringParser_BBCode extends StringParser { * @var bool */ var $_validateAgain = false; + + var $_savedName; + var $_quoting; + var $_savedCloseCount; + var $_savedValue; /** * Add a code @@ -1634,6 +1639,8 @@ class StringParser_BBCode_Node_Element extends StringParser_Node { * @var bool */ var $_paragraphHandled = false; + + var $_codeInfo = null; // //////////////////////////////////////////////// diff --git a/fp-plugins/blockparser/plugin.blockparser.php b/fp-plugins/blockparser/plugin.blockparser.php index 1af2626..3faab16 100644 --- a/fp-plugins/blockparser/plugin.blockparser.php +++ b/fp-plugins/blockparser/plugin.blockparser.php @@ -77,9 +77,11 @@ if (class_exists('AdminPanelAction')) { 'disable' ); + var $bp_enabled; + function doenable($id) { $success = -1; - $enabled = & $this->bp_enabled; + $enabled = &$this->bp_enabled; if (static_exists($id)) { if (!$enabled) { $enabled = array(); @@ -98,7 +100,7 @@ if (class_exists('AdminPanelAction')) { function dodisable($id) { $success = -2; - $enabled = & $this->bp_enabled; + $enabled = &$this->bp_enabled; if ($enabled && is_numeric($v = array_search($id, $enabled))) { unset($enabled [$v]); @sort($enabled); diff --git a/fp-plugins/commentcenter/inc/admin.php b/fp-plugins/commentcenter/inc/admin.php index b633be9..41f2673 100644 --- a/fp-plugins/commentcenter/inc/admin.php +++ b/fp-plugins/commentcenter/inc/admin.php @@ -43,6 +43,8 @@ class admin_entry_commentcenter extends AdminPanelAction { 'commdelok_2', 'ccancel_2' ); + + var $plugin; /** * This function is used as a callback when the panel is loaded.