Skip to content

Commit

Permalink
fixed bug #556
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.php.net/repository/pear/packages/XML_Beautifier/trunk@148543 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
Stephan Schmidt committed Jan 12, 2004
1 parent 3f2d2bf commit a3cee5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Beautifier/Renderer.php
Expand Up @@ -139,6 +139,7 @@ function _indentTextBlock($text, $depth, $trim = false)
$indent = $this->_getIndentString($depth);
$tmp = explode("\n", $text);
$cnt = count($tmp);
$xml = '';
for ($i = 0; $i < $cnt; $i++ ) {
if ($trim) {
$tmp[$i] = trim($tmp[$i]);
Expand Down
2 changes: 1 addition & 1 deletion Beautifier/Tokenizer.php
Expand Up @@ -349,7 +349,7 @@ function _appendToParent($struct)
function _getLastToken()
{
$parent = array_pop($this->_struct);
if (is_array($parent["children"])) {
if (isset($parent["children"]) && is_array($parent["children"])) {
$last = array_pop($parent["children"]);
array_push($parent["children"], $last);
} else {
Expand Down

0 comments on commit a3cee5a

Please sign in to comment.