catalyst / moodle-local_cohortauto

Automatically add users into cohorts. (Previously moodle-auth_mcae.)
https://moodle.org/plugins/local_cohortauto
11 stars 14 forks source link

Breaks Moodle 4.4 #40

Open emmarichardson opened 2 months ago

emmarichardson commented 2 months ago

This plugin has totally broken my site in 4.4 with following errors: Deprecated: Optional parameter $prefix declared before required parameter $result is implicitly treated as a required parameter in /var/www/html/local/cohortauto/lib.php on line 80

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/lib/classes/session/file.php on line 74

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/lib/classes/session/file.php on line 75

Warning: session_name(): Session name cannot be changed after headers have already been sent in /var/www/html/lib/classes/session/manager.php on line 385

Warning: session_set_cookie_params(): Session cookie parameters cannot be changed after headers have already been sent in /var/www/html/lib/classes/session/manager.php on line 400

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/lib/classes/session/manager.php on line 402

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/lib/classes/session/manager.php on line 403

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/lib/classes/session/manager.php on line 404

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/lib/classes/session/manager.php on line 405

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/lib/classes/session/manager.php on line 408

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/lib/classes/session/manager.php on line 409

Warning: ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/lib/classes/session/manager.php on line 410

Warning: session_start(): Session cannot be started after headers have already been sent in /var/www/html/lib/classes/session/handler.php on line 45

i have replicated the error on 2 separate 4.4 sites. Removing the plugin removes all the errors. Any chance it will be updated?

danmarsden commented 2 months ago

Hi @emmarichardson - probably an easyish fix related to the newer version of PHP - I can't guarantee when we'll look at this but turning off the display errors button should hide it from view (display errors shouldn't be turned on in a production site anyway.)

If you end up fixing this internally, feel free to send through a pull request.

thanks,