Return to bug38055.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / soap / tests / bugs |
1.1 misho 1: --TEST-- 2: Bug #38055 (Wrong interpretation of boolean parameters) 3: --SKIPIF-- 4: <?php require_once('skipif.inc'); ?> 5: --INI-- 6: soap.wsdl_cache_enabled=0 7: --FILE-- 8: <?php 9: function Test($param) { 10: global $g1, $g2; 11: $g1 = $param->boolA; 12: $g2 = $param->boolB; 13: return 1; 14: } 15: 16: class TestSoapClient extends SoapClient { 17: function __construct($wsdl) { 18: parent::__construct($wsdl); 19: $this->server = new SoapServer($wsdl); 20: $this->server->addFunction('Test'); 21: } 22: 23: function __doRequest($request, $location, $action, $version, $one_way = 0) { 24: ob_start(); 25: $this->server->handle($request); 26: $response = ob_get_contents(); 27: ob_end_clean(); 28: return $response; 29: } 30: } 31: 32: $client = new TestSoapClient(dirname(__FILE__).'/bug38055.wsdl'); 33: $boolA = 1; 34: $boolB = '1'; 35: $res = $client->Test(array('boolA'=>$boolA, 'boolB'=>$boolB)); 36: var_dump($g1); 37: var_dump($g2); 38: ?> 39: --EXPECT-- 40: bool(true) 41: bool(true)