Bug #79191 [NEW]: Error in SoapClient creation leads to DOMDocument::save() not working
| From: | sebastian@php.net | Date: | Wed, 29 Jan 2020 13:57:55 +0000 |
| Subject: | Bug #79191 [NEW]: Error in SoapClient creation leads to DOMDocument::save() not working | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-225219@lists.php.net to get a copy of this message | ||
From: sebastian
Operating system: Irrelevant
PHP version: 7.4.2
Package: DOM XML related
Bug Type: Bug
Bug description:Error in SoapClient creation leads to DOMDocument::save() not working
Description:
------------
When the creation of a SoapClient object fails then DOMDocument::save()
no longer works. This issue came up in the context of PHPUnit:
* https://github.com/sebastianbergmann/php-code-coverage/issues/692
* https://github.com/sebastianbergmann/php-code-coverage/pull/721
*
https://github.com/sebastianbergmann/php-code-coverage/issues/692#issuecomment-579761041
A minimal and self-contained script that reproduces the issue is
provided below.
Test script:
---------------
<?php
try {
new \SoapClient('does-not-exist.wsdl');
} catch (Throwable $t) {
}
$dom = new DOMDocument;
$dom->loadxml('<?xml version="1.0" ?><root />');
var_dump($dom->save('/tmp/test.xml'));
Expected result:
----------------
int(number of bytes written)
Actual result:
--------------
bool(false)
--
Edit bug report at https://bugs.php.net/bug.php?id=79191&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79191&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79191&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79191&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79191&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79191&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79191&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79191&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79191&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79191&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79191&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79191&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79191&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79191&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79191&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79191&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79191&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79191&r=mysqlcfg