From 93f98abdb95a83cbccd3fc1265487e5fe2e67472 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sat, 28 Oct 2006 10:37:54 +0000 Subject: [PATCH] Improve error output of install_from_xmldb_file(). Part of MDL-7262 Merged from MOODLE_17_STABLE --- lib/ddllib.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/ddllib.php b/lib/ddllib.php index 5166994653..2648f87b91 100644 --- a/lib/ddllib.php +++ b/lib/ddllib.php @@ -530,6 +530,12 @@ function install_from_xmldb_file($file) { $loaded = $xmldb_file->loadXMLStructure(); if (!$loaded || !$xmldb_file->isLoaded()) { + /// Show info about the error if we can find it + if ($structure =& $xmldb_file->getStructure()) { + if ($errors = $structure->getAllErrors()) { + notify('Errors found in XMLDB file: '. implode (', ', $errors)); + } + } return false; } -- 2.39.5