Skip to content
Browse files

Do not require line numbers

git-svn-id: http://svn.php.net/repository/pear/packages/XML_Tree/trunk@140090 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 0615a76 commit ba61d2c35782c2a382fab389235ef4beaa1e2be5 @tvvcox tvvcox committed
Showing with 4 additions and 4 deletions.
  1. +1 −1 Tree.php
  2. +3 −3 Tree/Node.php
View
2 Tree.php
@@ -118,7 +118,7 @@ function &getRoot()
* @return object XML_Tree_Node Reference to the newly created root node
* @access public
*/
- function &addRoot($name, $content = '', $attributes = array(), $lineno)
+ function &addRoot($name, $content = '', $attributes = array(), $lineno = null)
{
$this->root = new XML_Tree_Node($name, $content, $attributes, $lineno);
return $this->root;
View
6 Tree/Node.php
@@ -64,7 +64,7 @@ class XML_Tree_Node {
* @param string content Node content (text)
* @param array attributes Attribute-hash for the node
*/
- function XML_Tree_Node($name, $content = '', $attributes = array(), $lineno)
+ function XML_Tree_Node($name, $content = '', $attributes = array(), $lineno = null)
{
$this->name = $name;
$this->setContent($content);
@@ -85,7 +85,7 @@ function XML_Tree_Node($name, $content = '', $attributes = array(), $lineno)
* @return object reference to new child node
* @access public
*/
- function &addChild($child, $content = '', $attributes = array())
+ function &addChild($child, $content = '', $attributes = array(), $lineno = null)
{
$index = sizeof($this->children);
@@ -98,7 +98,7 @@ function &addChild($child, $content = '', $attributes = array())
$this->children[$index] = $child->root->getElement();
}
} else {
- $this->children[$index] = new XML_Tree_Node($child, $content, $attributes);
+ $this->children[$index] = new XML_Tree_Node($child, $content, $attributes, $lineno);
}
return $this->children[$index];

0 comments on commit ba61d2c

Please sign in to comment.
Something went wrong with that request. Please try again.