php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79341 XmlWriter docs does not say $uri is nullable
Submitted: 2020-03-04 10:31 UTC Modified: 2020-10-30 11:26 UTC
From: jtojnar at gmail dot com Assigned: cmb (profile)
Status: Closed Package: XML Writer
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2020-03-04 10:31 UTC] jtojnar at gmail dot com
Description:
------------
---
From manual pages:
* https://php.net/function.xmlwriter-write-attribute-ns
* https://www.php.net/manual/en/function.xmlwriter-write-element-ns.php
---

The URI element should be marked as nullable, see the stub:

https://github.com/php/php-src/blob/c05a9c3dcd587418906d9d25f83872e027f7dd43/ext/xmlwriter/xmlwriter.stub.php#L35

Test script:
---------------
<?php

$writer = new XMLWriter;
$writer->openMemory();
$writer->setIndent(true);
$writer->startElement('foo');
$writer->writeAttribute('xmlns:example', 'https://www.example.com/');
$writer->startElementNS('example', 'meta', null);
$writer->writeAttributeNS('example', 'spout', null, 'test');
$writer->endElement();
$writer->endElement();
echo $writer->outputMemory();



Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-03-04 12:51 UTC] cmb@php.net
The following pull request has been associated:

Patch Name: Fix #79341: XmlWriter docs does not say $uri is nullable
On GitHub:  https://github.com/php/doc-en/pull/54
Patch:      https://github.com/php/doc-en/pull/54.patch
 [2020-10-30 11:26 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=11952f8447b672c766e0bf6b6f709abe20fc1433
Log: Fix #79341: XmlWriter docs does not say $uri is nullable
 [2020-10-30 11:26 UTC] phpdocbot@php.net
-Status: Open +Status: Closed
 [2020-10-30 11:26 UTC] cmb@php.net
-Status: Closed +Status: Verified -Assigned To: +Assigned To: cmb
 [2020-10-30 11:26 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2020-10-30 22:55 UTC] phpdocbot@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=2bd1dfd7d570abadb50321cfca8f12d9c52d0a4d
Log: Fix #79341: XmlWriter docs does not say $uri is nullable
 [2020-12-30 11:58 UTC] nikic@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=06b4d904cffa5a3df11ba9ff985aa151969e6806
Log: Fix #79341: XmlWriter docs does not say $uri is nullable
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC