ZF-7635: Fatal error while loading html document into lucene (special case)
Description
In some cases, in '__construct', the head section of a Document/Html is not defined. So a fatal error appends.
Class : Zend_Search_Lucene_Document_Html / Line : 106
(@version $Id: Html.php 16971 2009-07-22 18:05:45Z mikaelkael $)
...
// Remove additional HEAD section
$xpath = new DOMXPath($this->_doc);
$head = $xpath->query('/html/head')->item(0);
$head->parentNode->removeChild($head); <-- FATAL ERROR
A test should be done on '$head' to see if it's correctly defined before removing child.
Bye
Comments
Posted by Rob Allen (rob) on 2012-11-20T20:52:59.000+0000
Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".
Feel free to re-open and provide a patch if you want to fix this issue.