Improve error output of install_from_xmldb_file(). Part of MDL-7262

Merged from MOODLE_17_STABLE
This commit is contained in:
stronk7 2006-10-28 10:37:54 +00:00
parent 68513b30de
commit 93f98abdb9

View File

@ -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;
}