Doc #79341 [NEW]: XmlWriter docs does not say $uri is nullable
| From: | jtojnar at gmail dot com | Date: | Wed, 04 Mar 2020 10:31:25 +0000 |
| Subject: | Doc #79341 [NEW]: XmlWriter docs does not say $uri is nullable | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-17359@lists.php.net to get a copy of this message | ||
From: jtojnar at gmail dot com
Operating system:
PHP version: Irrelevant
Package: XML Writer
Bug Type: Documentation Problem
Bug description:XmlWriter docs does not say $uri is nullable
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();
--
Edit bug report at https://bugs.php.net/bug.php?id=79341&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79341&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79341&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79341&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79341&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79341&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79341&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79341&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79341&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79341&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79341&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79341&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79341&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79341&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79341&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79341&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79341&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79341&r=mysqlcfg