summaryrefslogtreecommitdiff
path: root/ext/libxml
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-02-03 23:32:46 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2020-02-03 23:33:20 +0100
commit3fb41c202801ef26cd20c5778c17a899913eb3d1 (patch)
tree772c165917c9d03826bc4d2215d8d25e7592611f /ext/libxml
parent58b17906f512866c2e34844fa497ecdf7f1e1e3d (diff)
parentfe1bfb78d65d28dd151da417477a0cee51de8afb (diff)
downloadphp-git-3fb41c202801ef26cd20c5778c17a899913eb3d1.tar.gz
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #79191: Error in SoapClient ctor disables DOMDocument::save()
Diffstat (limited to 'ext/libxml')
-rw-r--r--ext/libxml/libxml.c3
-rw-r--r--ext/libxml/tests/bug79191.phpt24
2 files changed, 24 insertions, 3 deletions
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index 360d1999e7..c024e16670 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -382,9 +382,6 @@ static int php_libxml_streams_IO_read(void *context, char *buffer, int len)
static int php_libxml_streams_IO_write(void *context, const char *buffer, int len)
{
- if (CG(unclean_shutdown)) {
- return -1;
- }
return php_stream_write((php_stream*)context, buffer, len);
}
diff --git a/ext/libxml/tests/bug79191.phpt b/ext/libxml/tests/bug79191.phpt
new file mode 100644
index 0000000000..7d0dc83f23
--- /dev/null
+++ b/ext/libxml/tests/bug79191.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #79191 (Error in SoapClient ctor disables DOMDocument::save())
+--SKIPIF--
+<?php
+if (!extension_loaded('soap')) die('skip soap extension not available');
+if (!extension_loaded('dom')) die('dom extension not available');
+?>
+--FILE--
+<?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(__DIR__ . '/bug79191.xml'));
+?>
+--CLEAN--
+<?php
+unlink(__DIR__ . '/bug79191.xml');
+?>
+--EXPECTF--
+int(%d)