General help

Error PHP Moodle 2.7

 
Picture of Julio García García
Error PHP Moodle 2.7
 

Hello

I have a problem with my Moodle 2.7. This error appears:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; filterobject has a deprecated constructor in /home2/uejuliop/public_html/moodle/lib/filterlib.php on line 438

Can someone help me?

Thanks


 
Average of ratings: -
Picture of Bret Miller
Re: Error PHP Moodle 2.7
 

Moodle 2.7 doesn't support PHP 7.0. You need at least Moodle 3.0.1 to use PHP 7. Otherwise, stick with PHP 5.x.

 
Average of ratings: -
Picture of Julio García García
Re: Error PHP Moodle 2.7
 

Thank you!!

 
Average of ratings: -
Picture of AL Rachels
Re: Error PHP Moodle 2.7
Core developersParticularly helpful MoodlersPlugin developersTesters

Hi Julio,

As Bret mentioned, Moodle 2.7 doesn't support PHP 7.0. The debug message is slightly misleading as it is actually line 467 that is the problem. IF you REALLY want to try it.... in line 467, change "filterobject" so that it is "__construct" and that should get rid of the debug message. However, you would be better off to upgrade to the latest supported version of Moodle.

 
Average of ratings: -
Picture of Julio García García
Re: Error PHP Moodle 2.7
 

Thank you very much for the suggestion. I had already mounted a new version of Moodle in a new location on my server, but I needed to get into the old version and that mistake would not let me do it. You are amazing. Thank you.

 
Average of ratings: -
Picture of Daniel César
Re: Error PHP Moodle 2.7
 

Hello Julio. You need make this:


Where is in line 493 of file filterlib.php:


function filterobject( $phrase, &hreftagbegin = '<span class="hightlight">',


Change to:


function filterobjectx( $phrase, &hreftagbegin = '<span class="hightlight">',


Only this. 

Regards,

Daniel César

 
Average of ratings: Useful (1)
Picture of Mussab Aswad
Re: Error PHP Moodle 2.7
 

Many Thanks

 
Average of ratings: -