com php-src: Test for bug #69462: ext/soap/tests/bugs/bug69462.phpt

From: Date: Fri, 26 Jun 2015 21:19:29 +0000
Subject: com php-src: Test for bug #69462: ext/soap/tests/bugs/bug69462.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87550@lists.php.net to get a copy of this message
Commit: af17316fcdb685a0b0fe604be8a43116836142b6 Author: Tomasz Sawicki <falundir@gmail.com> Thu, 25 Jun 2015 18:32:01 +0200 Committer: Christoph M. Becker <cmb@php.net> Fri, 26 Jun 2015 23:19:29 +0200 Parents: 2ff3dafccfa4fd0bc031d5165f84593d092148d2 Branches: PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=af17316fcdb685a0b0fe604be8a43116836142b6 Log: Test for bug #69462 Test scenario for already fixed bug #69462 with segmentation fault when SoapVar XML node name was null. Bugs: https://bugs.php.net/69462 Changed paths: A ext/soap/tests/bugs/bug69462.phpt Diff: diff --git a/ext/soap/tests/bugs/bug69462.phpt b/ext/soap/tests/bugs/bug69462.phpt new file mode 100644 index 0000000..011e5e2 --- /dev/null +++ b/ext/soap/tests/bugs/bug69462.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #69462 __soapCall with a SoapVar that has a namespace but no name crashes +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$namespace = "http://example.com/ns"; + +$client = new SoapClient(null, [ 'exceptions' => 1, 'location' => "", 'uri' => $namespace ]); + +$soapvar = new SoapVar( + array( + new SoapVar('value', XSD_STRING, null, null, null, $namespace) + ), + SOAP_ENC_OBJECT, null, null, 'name', $namespace +); + +try { + $client->__soapCall('method', array($soapvar)); +} +catch (Exception $e) { + /* ignore any errors, we're testing for segmentation fault anyway */ + echo "good"; +} +--EXPECT-- +good

« previous php.cvs (#87550) next »