ZF-2262: xml_parser_free() called after exception is thrown
Description
Line 95, Zend/Translate/Adapter/Tbx.php
if (!xml_parse($this->_file, file_get_contents($filename))) {
throw new Zend_Translate_Exception(sprintf('XML error: %s at line %d',
xml_error_string(xml_get_error_code($this->_file)),
xml_get_current_line_number($this->_file)));
xml_parser_free($this->_file);
}
I would suggest the following:
if (!xml_parse($this->_file, file_get_contents($filename))) {
$exception = new Zend_Translate_Exception(sprintf('XML error: %s at line %d',
xml_error_string(xml_get_error_code($this->_file)),
xml_get_current_line_number($this->_file)));
xml_parser_free($this->_file);
throw $exception;
}
Comments
Posted by Lars Strojny (lars) on 2007-12-03T19:08:56.000+0000
Same for Zend_Translate_Adapter_Xliff, Zend_Translate_Adapter_XmlTm, Zend_Translate_Adapter_Tmx and Zend_Translate_Adapter_Qt
Posted by Lars Strojny (lars) on 2007-12-03T19:12:32.000+0000
Fixes the described problems
Posted by Thomas Weidner (thomas) on 2007-12-04T02:53:07.000+0000
Thanks for your suggestion...
I will look over it and see what we will do. You will get an answer in some days.
Posted by Thomas Weidner (thomas) on 2007-12-06T04:30:02.000+0000
Thanks for your interest and investigation related to this issue.
It is fixed with SVN-7049 within the trunk.