mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Catch errors in example (bug #49378)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@290719 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
cadd9e4ccd
commit
0d5dafc709
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ $context = stream_context_create(array('http' => array(
|
|||
)));
|
||||
$file = file_get_contents("http://www.example.com/xmlrpc", false, $context);
|
||||
$response = xmlrpc_decode($file);
|
||||
if (xmlrpc_is_fault($response)) {
|
||||
if ($response && xmlrpc_is_fault($response)) {
|
||||
trigger_error("xmlrpc: $response[faultString] ($response[faultCode])");
|
||||
} else {
|
||||
print_r($response);
|
||||
|
|
Loading…
Reference in a new issue