DomElement DomNode

1 view
Skip to first unread message

crash82

unread,
Sep 1, 2010, 7:20:03 AM9/1/10
to Professional PHP Developers
Hello,

I'm having the problem bellow, not sure how I can solve this...

My code is:
public function appendChild($child){
try {
$this->itemvenda->appendChild($child);
} catch (Exception $e){
// ERROR
exit;
}
}

PHP Strict standards: Declaration of EVenda::appendChild() should be
compatible with that of DOMNode::appendChild()


Strict standards: Declaration of EVenda::appendChild() should be
compatible with that of DOMNode::appendChild() in xxxxxx

Call Stack:
0.0043 1183184 1. {main}() xxxxxxxxx:0

What should I be doing to bypass this problem ?

Thanks in advance,
Fernando

Tyler Sommer

unread,
Sep 1, 2010, 12:12:21 PM9/1/10
to professi...@googlegroups.com
It looks like you are extending the DOMNode class with your class, correct?
If so, you should match the method signature of DOMNode::appendChild which
is:

public function appendChild(DOMNode $newnode) {
...
}


For the record, your E_STRICT error is not necessarily an error-- it's just
letting you know that you're not following strict PHP standards.

Tyler

Hello,

Thanks in advance,
Fernando

--
This group is managed and maintained by the development staff at 360 PSG. An
enterprise application development company utilizing open-source
technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups
"Professional PHP Developers" group.
To post to this group, send email to Professi...@googlegroups.com
To unsubscribe from this group, send email to
Professional-P...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Professional-PHP

crash82

unread,
Sep 9, 2010, 7:20:50 AM9/9/10
to Professional PHP Developers
Tanks, this solved it. I know it's not an error but every time I ran
this the message showed up it's anoying :P lol
Reply all
Reply to author
Forward
0 new messages