Skip to content
Permalink
Browse files

Merge branch 'wip-MDL-56110-master' of https://github.com/marinaglanc…

  • Loading branch information...
stronk7 committed Oct 13, 2016
2 parents dd8f30d + 62a3c42 commit 1c56029fa41916009fe6f3065c8ac8ebcba58bd1
Showing with 10 additions and 0 deletions.
  1. +10 −0 lib/pear/HTML/QuickForm.php
@@ -544,6 +544,16 @@ function getMaxFileSize()
*/
function &createElement($elementType)
{
if (!isset($this) || !($this instanceof HTML_QuickForm)) {
// Several form elements in Moodle core before 3.2 were calling this method
// statically suppressing PHP notices. This debugging message should notify
// developers who copied such code and did not test their plugins on PHP 7.1.
// Example of fixing group form elements can be found in commit
// https://github.com/moodle/moodle/commit/721e2def56a48fab4f8d3ec7847af5cd03f5ec79
debugging('Function createElement() can not be called statically, ' .
'this will no longer work in PHP 7.1',
DEBUG_DEVELOPER);
}
$args = func_get_args();
$element = self::_loadElement('createElement', $elementType, array_slice($args, 1));
return $element;

0 comments on commit 1c56029

Please sign in to comment.
You can’t perform that action at this time.