MaharaProject / moodle-assignsubmission_mahara

Old, unmaintained Mahara assignment submission plugin for Moodle
https://moodle.org/plugins/view/assignsubmission_mahara
4 stars 10 forks source link

PHP 7.1 compatibility: using $this in a static method #33

Open danowar2k opened 5 years ago

danowar2k commented 5 years ago

These lines contain a $this reference in a static context:

https://github.com/MaharaProject/moodle-assignsubmission_mahara/blob/87aa4d84d586d97080777bc059e16098f35928ce/classes/observers.php#L121-L135

Found using https://github.com/squizlabs/PHP_CodeSniffer and https://github.com/PHPCompatibility/PHPCompatibility.

Report output:

FILE: ...mod/assign/submission/mahara/classes/observers.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 130 | ERROR | "$this" can no longer be used in a plain function or
     |       | method since PHP 7.1.
----------------------------------------------------------------------
Richardvi commented 2 years ago

I think I'm having the same problem here:

image

Error code: generalexceptionmessage

When setting the Moodle-Mahara assignment to 'unlock after grading', the error occurs. It will not unlock.