HTML QuickForm issue after upgrading to PHP 5.6

HTML QuickForm issue after upgrading to PHP 5.6

by An sree -
Number of replies: 0

Hi ,

Currently, I am using Moodle 1.9 and I have 50 more sites. I know its deprecated Moodle but due to some personal reason cant able to upgrade now.I have used PHP 5.2 and old TLS protocol on my server. But recently PayPal and browsers stop TLS old version support.So I migrated all sites to a new server with updated TLS and PHP versions. Now MOodle 1.9 is running on the environment with PHP 5.6 . So I have a lot of code deprecation issues. 

When I take bulk user page I got a fatal error 

Fatal error: Call to undefined method MoodleQuickForm_hidden::MoodleQuickForm_hidden() in Moodle/lib/pear/HTML/QuickForm/element.php on line 363

I got a quick fix for this from the moodle forum. So I have added following code on the Moodle/lib/pear/HTML/QuickForm/element.php and issue has fixed


  public function __call($name, $args) {

    $name = str_replace('MoodleQuickForm_', '', $name);

  if ($name == 'passwordunmask') {

        $name = 'password'

}

    return call_user_func_array(array($this, 'HTML_QuickForm_'.$name), $args);

}

But today I have tried to add a course from the course wizard page. This is a custom module we can create the course easily. While creating course I did get a blank screen with a fatal error 

Allowed memory size of 134217728 bytes exhausted (tried to allocate 31015 bytes) in Moodle/lib/pear/HTML/QuickForm/element.php on line 

return call_user_func_array(array($this, 'HTML_QuickForm_'.$name), $args);

I already had enough memory in the php.ini file. however, I set the memory limits through the script. Then the error will disappear from the browser but the white screen still exists. It seems that its not a memory issue. Please anyone help me to find out the solution. Thanks in advance and apologize for the old moodle question

Average of ratings: -