From: stronk7 Date: Sat, 28 Oct 2006 10:37:54 +0000 (+0000) Subject: Improve error output of install_from_xmldb_file(). Part of MDL-7262 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=93f98abdb95a83cbccd3fc1265487e5fe2e67472;p=moodle.git Improve error output of install_from_xmldb_file(). Part of MDL-7262 Merged from MOODLE_17_STABLE --- 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; }