MDL-77347 mod_chat: Added missing class properties.

In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
This commit is contained in:
Meirza 2023-02-08 14:24:29 +07:00
parent 794f107e88
commit caddf4dd1d
2 changed files with 44 additions and 0 deletions

View File

@ -97,6 +97,45 @@ class ChatDaemon {
public $setsinfo = array(); // Keyed by sessionid exactly like conn_sets, one of these for each of those.
public $chatrooms = array(); // Keyed by chatid, holding arrays of data.
/** @var int error reporting level. */
public $_trace_level;
/** @var bool true if function_name exists and is a function, false otherwise. */
public $_pcntl_exists;
/** @var int */
public $_time_rest_socket;
/** @var string beep file location. */
public $_beepsoundsrc;
/** @var int update frequency records. */
public $_freq_update_records;
/** @var int upper limit value in seconds to detect a user has disconnected or not. */
public $_freq_poll_idle_chat;
/** @var resource|false a file pointer resource on success, or false on error. */
public $_stdout;
/** @var array user data with session ID as the key. */
public $sets_info = [];
/** @var array connection data with session ID as the key. */
public $conn_sets = [];
/** @var array connection data. */
public $conn_side = [];
/** @var array connection data. */
public $conn_half = [];
/** @var array connection data. */
public $conn_ufo = [];
/** @var resource|Socket socket resource. */
public $listen_socket;
// IMPORTANT: $connectionssets, $setsinfo and $chatrooms must remain synchronized!
// Pay extra attention when you write code that affects any of them!

View File

@ -35,6 +35,11 @@ class chat_portfolio_caller extends portfolio_module_caller_base {
protected $start;
/** @var int Timestamp */
protected $end;
/** @var array Chat messages */
protected $messages = [];
/** @var bool True if participated, otherwise false. */
protected $participated;
/**
* @return array
*/