ericmerrill / moodle-mod_webexactivity

A Cisco WebEx activity module for Moodle
https://moodle.org/plugins/view.php?plugin=mod_webexactivity
9 stars 13 forks source link

PHP 8.0 compatibility #30

Open MonsieurCellophane opened 1 year ago

MonsieurCellophane commented 1 year ago

When accessing a meeting on moodle 4.1, with php8.0, the following error is displayed:

Unsupported operand types: string * int

this is an exception thrown in mod_webexactivity\local\type\base\meeting->get_time_status() at line 408 of /mod/webexactivity/classes/local/type/base/meeting.php:

$endtime = $this->starttime + ($this->duration * 60) + ($grace * 60);

It disappears if the line is corrected thusly:

$endtime = $this->starttime + ((int)$this->duration * 60) + ((int)$grace * 60);

However, this is a clear sign that the module is not working properly in php8.0 (not surprising, as it was last updated three years ago) and that other errors like this may be lurking in the code. This makes me wonder whether compatibility will ever come, and what can be done about it.