diff --git a/vendor/symfony/lib/i18n/sfMessageSource_XLIFF.class.php b/vendor/symfony/lib/i18n/sfMessageSource_XLIFF.class.php index 6548959215..2ca215542a 100644 --- a/vendor/symfony/lib/i18n/sfMessageSource_XLIFF.class.php +++ b/vendor/symfony/lib/i18n/sfMessageSource_XLIFF.class.php @@ -54,6 +54,16 @@ public function &loadData($filename) if (!$xml = simplexml_load_file($filename)) { $error = false; + $xmlErrors = libxml_get_errors(); + $errorMessage = ''; + foreach ($xmlErrors as $error) { + $errorMessage .= sprintf("%s[File]: %s at line %s, column %s\n", + $error->message, $error->file, $error->line, $error->column); + } + if ($errorMessage) { + throw new sfException(sprintf("Could not load XML file:\n\n%s", + $errorMessage)); + } return $error; }