We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit ba5a43f2 authored by mattl's avatar mattl

If XMLOutputter $output arg is null, use php://output

Since pushing a null value to the argument actually sets it to null
and not the default fallback (previously $output='php://output');
parent f1d9d8a6
...@@ -63,12 +63,15 @@ class XMLOutputter ...@@ -63,12 +63,15 @@ class XMLOutputter
* *
* Initializes the wrapped XMLWriter. * Initializes the wrapped XMLWriter.
* *
* @param string $output URL for outputting, defaults to stdout * @param string $output URL for outputting, if null it defaults to stdout ('php://output')
* @param boolean $indent Whether to indent output, default true * @param boolean $indent Whether to indent output, default true
*/ */
function __construct($output='php://output', $indent=null) function __construct($output=null, $indent=null)
{ {
if (is_null($output)) {
$output = 'php://output';
}
$this->xw = new XMLWriter(); $this->xw = new XMLWriter();
$this->xw->openURI($output); $this->xw->openURI($output);
if(is_null($indent)) { if(is_null($indent)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment