PHP Classes

Dom Error

Recommend this page to a friend!

      EPub  >  All threads  >  Dom Error  >  (Un) Subscribe thread alerts  
Subject:Dom Error
Summary:throws this dom error
Messages:2
Author:james
Date:2014-12-21 14:05:06
 

  1. Dom Error   Reply   Report abuse  
Picture of james james - 2014-12-21 14:05:06
21-Dec-2014 13:58:54 UTC] PHP Catchable fatal error: Argument 1 passed to DOMDocument::importNode() must be an instance of DOMNode, null given, called in /home/spang/public_html/epub/EPub.php on line 361 and defined in /home/spang/public_html/epub/EPub.php on line 732


This only happens when I try to add an image in a chapter
I have parsed the HTML file to split it inot chapters
$names array is the chapter list
$chap is the name+html and $Chp is the content
when I hit a <IMG > Tag it tries the following line to add the reference


$book->addChapter($names[$i], $chap, $chp, true, EPub::EXTERNAL_REF_ADD);
any ideas?



  2. Re: Dom Error   Reply   Report abuse  
Picture of james james - 2014-12-21 14:16:08 - In reply to message 1 from james
further

pulled from the Html file itself

<IMG SRC="DefiantHeart_edit1-ws-kindle_html_m1d254bb5.jpg" NAME="graphics1" ALIGN=BOTTOM WIDTH=500 HEIGHT=600 BORDER=0>

and that may be the problem because it doesn't have a path???