Jump to content

Invalid State Error


superaktieboy

Recommended Posts

I have a class (P3TElement) that extends the DOMElement class in PHP. In there i have a public variable "attributes" which is an array, and an method named add_attribute($attr), the argument is a different class (P3TAttribute). However I am getting an error when trying to use it.

The exact error is:

Warning: P3TElement::add_attribute() [p3telement.add-attribute]: Invalid State Error in D:\www\p3textract\extract.php on line 110

 

Please see the code: http://pastebin.com/CbsM9V5W

 

This class is supposed to extract .p3t (ps3 themes) files, and is a direct port of the python equivalent found at http://p3textractor.googlecode.com/svn/trunk/p3textractor.py

 

Could you please help me fix this?

 

thanks in advance,

 

Hosh

Link to comment
Share on other sites

Ok, so I fixed that error, by renaming the $attributes field to something $attribs, though i have a new error.

 

Warning: DOMNode::appendChild() [domnode.appendchild]: Couldn't fetch P3TElement in D:\www\p3textract\extract.php on line 103

 

Can anyone help?

 

again same file btw, except $attributes within the class P3TElement has been renamed $attribs as mentioned above.

 

thanks.

 

EDIT: new uploaded version: http://pastebin.com/SsAV7Zte

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.