Added missing properties to fix "Dynamic properties are deprecated"

errors under PHP 8.2
This commit is contained in:
azett 2023-10-28 13:56:05 +02:00
parent f8f6b56727
commit 107f6d99eb
11 changed files with 43 additions and 7 deletions

View File

@ -41,6 +41,8 @@ class admin_entry_write extends AdminPanelActionValidated {
var $draft = false; var $draft = false;
var $id = null;
function _makePreview($arr, $id = null) { function _makePreview($arr, $id = null) {
if (!$id) { if (!$id) {
$arr ['subject'] = apply_filters('title_save_pre', $arr ['subject']); $arr ['subject'] = apply_filters('title_save_pre', $arr ['subject']);

View File

@ -37,6 +37,7 @@ class tpl_deleter extends fs_filelister {
class s_entry_crawler extends fs_filelister { class s_entry_crawler extends fs_filelister {
var $_directory = CONTENT_DIR; var $_directory = CONTENT_DIR;
var $index;
function __construct() { function __construct() {
$this->index = entry_init(); $this->index = entry_init();

View File

@ -41,6 +41,10 @@ class admin_plugin_default extends AdminPanelAction {
var $errors = array(); var $errors = array();
var $pluginid;
var $fp_plugins;
function setup() { function setup() {
$this->pluginid = isset($_GET ['plugin']) ? $_GET ['plugin'] : null; $this->pluginid = isset($_GET ['plugin']) ? $_GET ['plugin'] : null;

View File

@ -17,6 +17,7 @@
class admin_static_delete extends AdminPanelAction { class admin_static_delete extends AdminPanelAction {
var $events = array('delete', 'cancel'); var $events = array('delete', 'cancel');
var $page;
function setup() { function setup() {
$this->page = @($_REQUEST['page']); $this->page = @($_REQUEST['page']);

View File

@ -543,6 +543,8 @@ class BPlusTree_Node {
*/ */
var $validkeys; var $validkeys;
var $storage;
/** /**
* constructor * constructor
* *
@ -1559,6 +1561,8 @@ class BPlusTree {
*/ */
var $fifo_enabled = false; var $fifo_enabled = false;
var $file = null;
/** /**
* constructor * constructor
* *
@ -2376,14 +2380,14 @@ class BPlusTree {
class BPlusWalker { class BPlusWalker {
var $tree; var $tree;
var $keylower; var $keylower;
var $includelower; var $includelower;
var $keyupper; var $keyupper;
var $includeupper; var $includeupper;
var $startnode;
var $node;
var $node_index;
var $valid;
function __construct(&$tree, &$keylower, $includelower = null, $keyupper = null, $includeupper = null) { function __construct(&$tree, &$keylower, $includelower = null, $keyupper = null, $includeupper = null) {
$this->tree = & $tree; $this->tree = & $tree;
@ -2572,8 +2576,10 @@ class caching_BPT extends BPlusTree {
class SBPlusTree extends BPlusTree { class SBPlusTree extends BPlusTree {
var $maxstring; var $maxstring;
var $stringfile; var $stringfile;
var $nodesize;
var $keylen;
var $position;
function __construct($infile, $stringfile, $maxstring = 256, $pos = null, $nodesize = null, $keylen = null) { function __construct($infile, $stringfile, $maxstring = 256, $pos = null, $nodesize = null, $keylen = null) {
parent::__construct($infile, $pos, $nodesize, $keylen); parent::__construct($infile, $pos, $nodesize, $keylen);

View File

@ -39,6 +39,8 @@ class entry_index {
var $_lock_file = null; var $_lock_file = null;
var $catlist = null;
function __construct() { function __construct() {
$this->_lock_file = CACHE_DIR . 'bpt.lock'; $this->_lock_file = CACHE_DIR . 'bpt.lock';

View File

@ -160,6 +160,13 @@ class FPDB_Query {
var $walker = null; var $walker = null;
var $prevkey = null;
var $nextkey = null;
var $comments = null;
function __construct($params, $ID) { function __construct($params, $ID) {
global $current_query; global $current_query;

View File

@ -209,6 +209,8 @@ class StringParser {
*/ */
var $_recentlyReparsed = false; var $_recentlyReparsed = false;
var $_output;
/** /**
* Constructor * Constructor
* *

View File

@ -151,6 +151,11 @@ class StringParser_BBCode extends StringParser {
*/ */
var $_validateAgain = false; var $_validateAgain = false;
var $_savedName;
var $_quoting;
var $_savedCloseCount;
var $_savedValue;
/** /**
* Add a code * Add a code
* *
@ -1635,6 +1640,8 @@ class StringParser_BBCode_Node_Element extends StringParser_Node {
*/ */
var $_paragraphHandled = false; var $_paragraphHandled = false;
var $_codeInfo = null;
// //////////////////////////////////////////////// // ////////////////////////////////////////////////
/** /**

View File

@ -77,9 +77,11 @@ if (class_exists('AdminPanelAction')) {
'disable' 'disable'
); );
var $bp_enabled;
function doenable($id) { function doenable($id) {
$success = -1; $success = -1;
$enabled = & $this->bp_enabled; $enabled = &$this->bp_enabled;
if (static_exists($id)) { if (static_exists($id)) {
if (!$enabled) { if (!$enabled) {
$enabled = array(); $enabled = array();
@ -98,7 +100,7 @@ if (class_exists('AdminPanelAction')) {
function dodisable($id) { function dodisable($id) {
$success = -2; $success = -2;
$enabled = & $this->bp_enabled; $enabled = &$this->bp_enabled;
if ($enabled && is_numeric($v = array_search($id, $enabled))) { if ($enabled && is_numeric($v = array_search($id, $enabled))) {
unset($enabled [$v]); unset($enabled [$v]);
@sort($enabled); @sort($enabled);

View File

@ -44,6 +44,8 @@ class admin_entry_commentcenter extends AdminPanelAction {
'ccancel_2' 'ccancel_2'
); );
var $plugin;
/** /**
* This function is used as a callback when the panel is loaded. * This function is used as a callback when the panel is loaded.
* It indicates the Smarty template and it saves by reference the * It indicates the Smarty template and it saves by reference the