Deprecated functions __constructor

This forum post has been removed

Number of replies: 3
The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Deprecated functions __constructor

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Probably... you can no longer use the name of a class as the method name for the constructor. You have to change its name to __constructor(). Should be as simple as that. 

If you didn't write the module then best to get in touch with the maintainer. 

In reply to Deleted user

Re: Deprecated functions __constructor

by Damyon Wiese -

<pre>

Several changes in Moodle core, standard plugins and third party libraries to                                                     

  ensure compatibility with PHP7. All plugins are recommended to perform testing                                                    

  against PHP7 as well. Refer to https://docs.moodle.org/dev/Moodle_and_PHP7 for more                                               

  information. The following changes may affect you:                                                                                

  * Class moodleform, moodleform_mod and some module classes have been changed to use                                               

    __construct() for the constructor. Calling parent constructors by the class                                                     

    name will display debugging message. Incorrect: parent::moodleform(),                                                           

    correct: parent::__construct()                               

...

</pre>


(From lib/upgrade.txt).

Average of ratings: Useful (1)
In reply to Deleted user

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.