Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

loadXML must be called AFTER preserveWhiteSpace #296

Closed
wants to merge 1 commit into from

2 participants

@riker09

I created a very simple test case and could confirm this for PHP 5.3.10-1ubuntu3.9. If I load the XML before calling $dom->preserveWhiteSpace = false; the passed XML will remain unchanged. If I load the XML after setting the value everything works as expected. This might be related to issue #3.

@riker09 riker09 loadXML must be called *AFTER* preserveWhiteSpace
I created a very simple test case and could confirm this for PHP 5.3.10-1ubuntu3.9. If I load the XML *before* calling `$dom->preserveWhiteSpace = false;` the passed XML will remain unchanged. If I load the XML *after* setting the value everything works as expected. This might be related to issue #3.
c9e9e09
@cmuench
Owner

thanks. I will check this at the weekend.

@cmuench cmuench referenced this pull request from a commit
@cmuench cmuench [TASK] Manually merged pull request #296 - loadXML must be called AFT…
…ER preserveWhiteSpace
2354ce6
@cmuench
Owner

Thanks. I merged it to develop branch.

@cmuench cmuench closed this
@steverobbins steverobbins referenced this pull request from a commit in steverobbins/n98-magerun
@cmuench cmuench [TASK] Manually merged pull request #296 - loadXML must be called AFT…
…ER preserveWhiteSpace
671611f
@steverobbins steverobbins referenced this pull request from a commit in steverobbins/n98-magerun
@cmuench cmuench [TASK] Manually merged pull request #296 - loadXML must be called AFT…
…ER preserveWhiteSpace
ca226db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 29, 2014
  1. @riker09

    loadXML must be called *AFTER* preserveWhiteSpace

    riker09 authored
    I created a very simple test case and could confirm this for PHP 5.3.10-1ubuntu3.9. If I load the XML *before* calling `$dom->preserveWhiteSpace = false;` the passed XML will remain unchanged. If I load the XML *after* setting the value everything works as expected. This might be related to issue #3.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/N98/Magento/Command/Config/DumpCommand.php
View
2  src/N98/Magento/Command/Config/DumpCommand.php
@@ -54,9 +54,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
throw new \InvalidArgumentException('xpath was not found');
}
$dom = new \DOMDocument();
- $dom->loadXML($config->asXml());
$dom->preserveWhiteSpace = false;
$dom->formatOutput = true;
+ $dom->loadXML($config->asXml());
$output->writeln($dom->saveXML());
}
}
Something went wrong with that request. Please try again.