MDL-55123 forms: do not call non-static methods statically

this breaks in PHP7.1
This commit is contained in:
Marina Glancy
2016-09-12 12:06:18 +08:00
parent 64c45a2928
commit 721e2def56
8 changed files with 75 additions and 28 deletions
+2 -2
View File
@@ -545,7 +545,7 @@ class HTML_QuickForm extends HTML_Common {
function &createElement($elementType)
{
$args = func_get_args();
$element =& HTML_QuickForm::_loadElement('createElement', $elementType, array_slice($args, 1));
$element = self::_loadElement('createElement', $elementType, array_slice($args, 1));
return $element;
} // end func createElement
@@ -566,7 +566,7 @@ class HTML_QuickForm extends HTML_Common {
function &_loadElement($event, $type, $args)
{
$type = strtolower($type);
if (!HTML_QuickForm::isTypeRegistered($type)) {
if (!self::isTypeRegistered($type)) {
$error = self::raiseError(null, QUICKFORM_UNREGISTERED_ELEMENT, null, E_USER_WARNING, "Element '$type' does not exist in HTML_QuickForm::_loadElement()", 'HTML_QuickForm_Error', true);
return $error;
}