Open haietza opened 2 years ago
It would be helpful if you specified which version.php file exactly, @haietza .
@lucaboesch I apologize, I forgot all the plugins were included in this repo. It is the MOODLE_311_DEV branch of the local_kaltura plugin version file. Thank you!
We're hitting exactly the same problem for one of our customer sites.
version.php files can get accessed from all sorts of places, for a great number of reasons - it is a really, really terrible idea to be doing any sort of DB query within the version.php file.
At the very least this entire section of version.php file should be wrapped in a try-catch block to prevent fatal errors (but, ideally, this should be removed completely).
The version.php file includes the code:
$localKalturaPluginVersionRecord = $DB->get_records_select('config_plugins', "plugin = 'local_kaltura' AND name = 'version'");
This code attempts to access the config_plugins table, which has not been created yet on a fresh install of Moodle. I'm thinking this (and other version check code in the version.php file) probably belong in update.php?