note 117971 deleted from function.xmlwriter-open-uri by cmb
| From: | cmb@php.net | Date: | Sun, 20 Sep 2020 13:26:43 +0000 |
| Subject: | note 117971 deleted from function.xmlwriter-open-uri by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215148@lists.php.net to get a copy of this message | ||
Note Submitter: tloeffler
----
Reproduced on Windows:
If you get an exception when you try to handle the created file (rename, move etc.) you should unset
the XMLWriter instance.
In other case you'll get an exception because the XMLWriter process holds access to this file.
<?php
$xml = new \XMLWriter();
$xml->openUri(...)
...
$xml->flush();
unset($xml); //important!