Edit report at http://pear.php.net/bugs/bug.php?id=18636&edit=1
ID: 18636
Updated by: [email protected]
Reported By: jakob at ybals dot de
Summary: getStatus() is undefined
-Status: Open
+Status: Duplicate
Type: Bug
Package: XML_RPC2
Operating System: Mac OS X 10.6.7
Package Version: 1.0.8
PHP Version: Irrelevant
Roadmap Versions:
New Comment:
-Status: Open
+Status: Duplicate
Dupe of Bug #18329 ; fixed in SVN. However, that's been a while so a QA
release may be in order. Thanks for the report!
Previous Comments:
------------------------------------------------------------------------
[2011-06-30 10:07:56] jakber
Added #patch
bug:18636;patch:changed-getStatus-object;revision:1309424876;.
------------------------------------------------------------------------
[2011-06-30 09:51:18] jakber
Description:
------------
PHP 5.2.17
When try to establish a connection to a XML-RPC-2-Server qwith the code
looks like in test script I get an error in php log file which is lile
"$request->getStatus() is undefined".
The problem is in line 235 of file (/usr/lib/php/XML/RPC2/Util/)
HTTPRequest.php (which is named also by the error log).
Test script:
---------------
Just run $rpc_client = XML_RPC2_Client::create($rpc_server_url,
$options); with wrong options/url to get a non 200 HTTP Request result
status.
Expected result:
----------------
Replace this:
if ($result->getStatus() != 200) throw new
XML_RPC2_ReceivedInvalidStatusCodeException('Received non-200 HTTP Code:
' . $request->getStatus() . '. Response body:' . $result->getBody());
With this:
if ($result->getStatus() != 200) throw new
XML_RPC2_ReceivedInvalidStatusCodeException('Received non-200 HTTP Code:
' . $result->getStatus() . '. Response body:' . $result->getBody());
Change:
The second getStatus() call is a member of object result and not
request.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=18636&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.