From: Mikael Nordfeldth Date: Thu, 16 Jul 2015 21:58:04 +0000 (+0200) Subject: If XMLOutputter $output arg is null, use php://output X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ba5a43f2f9c712cfb4d5dac4112e8cab25b4260c;p=quix0rs-gnu-social.git 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'); --- 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)) {