MDL-78145 lib: Added missing class properties in pear

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-05-08 09:51:29 +07:00
parent 4ed782dd03
commit 928b300bc7
4 changed files with 7 additions and 3 deletions

View File

@ -138,7 +138,7 @@ class HTML_QuickForm_Renderer_Array extends HTML_QuickForm_Renderer
* false: leave labels as defined
* @var bool
*/
var $staticLabels = false;
var $_staticLabels = false;
/**
* Constructor
@ -187,7 +187,6 @@ class HTML_QuickForm_Renderer_Array extends HTML_QuickForm_Renderer
if ($this->_collectHidden) {
$this->_ary['hidden'] = '';
}
$this->_elementIdx = 1;
$this->_currentSection = null;
$this->_sectionCount = 0;
} // end func startForm

View File

@ -124,7 +124,6 @@ class HTML_QuickForm_Renderer_Object extends HTML_QuickForm_Renderer
if($this->_collectHidden) {
$this->_obj->hidden = '';
}
$this->_elementIdx = 1;
$this->_currentSection = null;
$this->_sectionCount = 0;
} // end func startForm

View File

@ -815,6 +815,9 @@ class PEAR_Error
var $userinfo = '';
var $backtrace = null;
/** @var mixed error level. */
private $callback;
/**
* PEAR_Error constructor
*

View File

@ -35,6 +35,9 @@ MDL-71126 - Quiz: Manual grading page size preference can get stuck at 0
MDL-76102 / MDL-77081
PHP 8.1 passing null to a non-nullable argument of a built-in function is deprecated
MDL-77164 - PHPdocs corrections
MDL-78145 - PHP 8.2 compliance. Added a missing class property that still need to be declared
to avoid dynamic properties deprecated error warning.
And also remove the $_elementIdx because it is not needed in Moodle code.
Pear
====