MDL-65995 components: Too early to use debugging()

components are loaded very early in Moodle bootstrap/warmup
process. So, basically, core_component must be vanilla php
and moodlelib/weblib facilitites are not available yet.

So, changing debugging() call to error_log(), to make it
consistent with the rest of the calls in the method.
This commit is contained in:
Eloy Lafuente (stronk7)
2019-06-22 12:06:25 +02:00
parent df272345ba
commit 3a1522b1a4
+2 -3
View File
@@ -537,9 +537,8 @@ $cache = '.var_export($cache, true).';
if (file_exists("$ownerdir/db/subplugins.json")) {
$subplugins = (array) json_decode(file_get_contents("$ownerdir/db/subplugins.json"))->plugintypes;
} else if (file_exists("$ownerdir/db/subplugins.php")) {
debugging('Use of subplugins.php has been deprecated. ' .
'Please update your plugin to provide a subplugins.json file instead.',
DEBUG_DEVELOPER);
error_log('Use of subplugins.php has been deprecated. ' .
"Please update your '$ownerdir' plugin to provide a subplugins.json file instead.");
include("$ownerdir/db/subplugins.php");
}