General developer forum

Cannot use 'object' as class name

Picture of Darko Miletić
Re: Cannot use 'object' as class name
Core developersParticularly helpful Moodlers

If you look here:

You will see that PHP 7.0.x and 7.1.x can be used with caution. Nobody mentions PHP 7.2.x which is what you have.

In PHP 7.2 it is strictly prohibited to declare classes that have reserved names. Moodle up until 3.4 does have instances of this.

Possible solutions:

Average of ratings: Useful (2)