symphonycms/symphony-2 — Issue #1000: XMLElement: passing XMLElement Object as $value fails
Author: iwyg
Created: 2012-02-03 22:58:00+00:00
State: open

When creating an new instance of XMLElement and passing another XMLElement (instead of a string ) as $value I get this error (public generate):

strlen() expects parameter 1 to be string, object given
/Users/malcolm/Sites/symdev/symphony/lib/toolkit/class.xmlelement.php line 592

587	}
588	}
589
590	$numberOfchildren = $this->getNumberOfChildren();
591
592	if($numberOfchildren > 0 || strlen($this->_value) != 0 || !$this->_selfclosing){
593
594	$result .= '>';
595
596

I did a quick test in evaluating that `$this->_value` is a string before getting its `strlen`. This would remove the error but the child element nerves gets appended to its parent Element.
Can you confirm this?