diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-02-03 23:38:40 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-02-03 23:38:40 +0100 |
commit | f00afaeed59d5d2e175681f22292589975ed8c16 (patch) | |
tree | d9723599f5f84273d7d323e501bc68ccb71941c4 /ext/libxml | |
parent | f8d795820e780a6322e054c26c581570613c14f0 (diff) | |
parent | 3fb41c202801ef26cd20c5778c17a899913eb3d1 (diff) | |
download | php-git-f00afaeed59d5d2e175681f22292589975ed8c16.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #79191: Error in SoapClient ctor disables DOMDocument::save()
Diffstat (limited to 'ext/libxml')
-rw-r--r-- | ext/libxml/libxml.c | 3 | ||||
-rw-r--r-- | ext/libxml/tests/bug79191.phpt | 24 |
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) |