Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.14.0

Bug #19455 Server responding with an extra ; in set-cookie throws a PHP Notice
Submitted: 2012-06-05 09:17 UTC
From: scott_ladoo Assigned:
Status: Open Package: SOAP (version 0.13.0)
PHP Version: 5.3.5 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2012-06-05 09:17 UTC] scott_ladoo (Scott Beca)
Description: ------------ If the server hosting the WSDL responds with an extra ; on the end of the set-cookie header, e.g.: Set-Cookie: domain=example.com; path=/; Then a PHP Notice is thrown, e.g.: PHP Notice: Undefined offset: 1 in /usr/share/php/SOAP/Transport/HTTP.php on line 304 This happens because the explode(';', $headervalue) on line 298 creates an empty entry in the array. The fix for this problem is to insert the following line in- between lines 303 and 304: if (!empty($elements[$i])) { And to insert the following line in-between lines 313 and 314: } Test script: --------------- require_once "SOAP/Client.php"; $client = new SOAP_Client("URL", true, false, array(), false); $params = array( "Username" => "user", "Password" => "pass" ); $response = $client->call("LoginUser", $params); Actual result: -------------- PHP Notice: Undefined offset: 1 in /usr/share/php/SOAP/Transport/HTTP.php on line 304

Comments