From 5305ddc0a4898a47e787c70ea1c03d298c9d8489 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Mon, 19 Jun 2023 15:51:59 +0100 Subject: [PATCH] MDL-77988 dml: clarify logic when dropping plugin tables. Comparison of method void return within a conditional didn't make sense, and the aforementioned method throws an exception on error anyway which would halt execution. --- lib/adminlib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/adminlib.php b/lib/adminlib.php index 39601545a70..1f251bf6e28 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -366,8 +366,8 @@ function drop_plugin_tables($name, $file, $feedback=true) { global $CFG, $DB; // first try normal delete - if (file_exists($file) and $DB->get_manager()->delete_tables_from_xmldb_file($file)) { - return true; + if (file_exists($file)) { + $DB->get_manager()->delete_tables_from_xmldb_file($file); } // then try to find all tables that start with name and are not in any xml file