Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Patch to Zend Framework 1.11.4 to add filename to exception description when TMX parsing fails
Index: library/Zend/Translate/Adapter/Tmx.php
===================================================================
--- library/Zend/Translate/Adapter/Tmx.php (revision 3015)
+++ library/Zend/Translate/Adapter/Tmx.php (working copy)
@@ -74,9 +74,10 @@
xml_set_character_data_handler($this->_file, "_contentElement");
if (!xml_parse($this->_file, file_get_contents($filename))) {
- $ex = sprintf('XML error: %s at line %d',
+ $ex = sprintf('XML error: %s at line %d of file %s',
xml_error_string(xml_get_error_code($this->_file)),
- xml_get_current_line_number($this->_file));
+ xml_get_current_line_number($this->_file),
+ $filename);
xml_parser_free($this->_file);
require_once 'Zend/Translate/Exception.php';
throw new Zend_Translate_Exception($ex);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.