From 3a1522b1a4e4f4c2b196ed3e13afd5591389aac7 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Sat, 22 Jun 2019 12:06:25 +0200 Subject: [PATCH] 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. --- lib/classes/component.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/classes/component.php b/lib/classes/component.php index 2f1d3363751..187fde8d555 100644 --- a/lib/classes/component.php +++ b/lib/classes/component.php @@ -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"); }