From ba5a43f2f9c712cfb4d5dac4112e8cab25b4260c Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 16 Jul 2015 23:58:04 +0200 Subject: [PATCH] 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'); --- lib/xmloutputter.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/xmloutputter.php b/lib/xmloutputter.php index 71d57e2d56..463f91be30 100644 --- a/lib/xmloutputter.php +++ b/lib/xmloutputter.php @@ -63,12 +63,15 @@ class XMLOutputter * * 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 */ - 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->openURI($output); if(is_null($indent)) {