Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, bool given #50

Closed
vedmant opened this issue Aug 28, 2019 · 2 comments

Comments

@vedmant
Copy link

vedmant commented Aug 28, 2019

Hi, I'm trying to use this lib, but at the first try to load XML I have this error:
Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, bool given

XML:

<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
 <header>
  <version>0.9</version>
  </header>
 <body>
  <data_block>
   <dt_assoc>
    <item key="protocol">XCP</item>
    <item key="object">DOMAIN</item>
    <item key="is_success">1</item>
    <item key="attributes">
     <dt_assoc>
      <item key="exp_domains">
       <dt_array>
        <item key="0">
         <dt_assoc>
          <item key="f_let_expire">N</item>
          <item key="expiredate">2019-10-07 16:24:36</item>
          <item key="name">test1.com</item>
          <item key="f_auto_renew">Y</item>
         </dt_assoc>
        </item>
        <item key="1">
         <dt_assoc>
          <item key="expiredate">2019-10-08 20:34:56</item>
          <item key="f_let_expire">Y</item>
          <item key="f_auto_renew">N</item>
          <item key="name">test2.com</item>
         </dt_assoc>
        </item>
       </dt_array>
      </item>
      <item key="page">1</item>
      <item key="total">2</item>
      <item key="remainder">0</item>
     </dt_assoc>
    </item>
    <item key="response_text">Command successful</item>
    <item key="response_code">200</item>
    <item key="action">REPLY</item>
   </dt_assoc>
  </data_block>
 </body>
</OPS_envelope>

PHP: 7.3

@kinekt4
Copy link

kinekt4 commented Dec 17, 2020

Can confirm this. simplexml_load_file doesn't seem to have a problem loading the document.

FluiXML seems to have a problem with the DOCTYPE line

<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">

If you remove it, then it's fine.

@daniele-orlando
Copy link
Member

daniele-orlando commented Dec 17, 2020

It could be a duplicate of #44.
Thanks @kinekt4 for the quick tip. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants