summaryrefslogtreecommitdiff
path: root/ext/libxml
diff options
context:
space:
mode:
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 01dc753c7e..edc2020f46 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -354,9 +354,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)