diff options
author | jim-p <jimp@pfsense.org> | 2013-02-07 10:19:46 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-02-07 10:19:46 -0500 |
commit | de89528588390be2266b4421387ae9222a90306d (patch) | |
tree | 0c4c641ab351020b4eedbf8124f4753e516a4ecf /etc/inc/xmlrpc_client.inc | |
parent | fb6c8051f09159b8b214ddd08a0250ab6c050a66 (diff) | |
download | pfsense-de89528588390be2266b4421387ae9222a90306d.zip pfsense-de89528588390be2266b4421387ae9222a90306d.tar.gz |
Don't generate a PHP error for an unfetchable XML file.
Diffstat (limited to 'etc/inc/xmlrpc_client.inc')
-rw-r--r-- | etc/inc/xmlrpc_client.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/xmlrpc_client.inc b/etc/inc/xmlrpc_client.inc index b0f93a6..cc91f6d 100644 --- a/etc/inc/xmlrpc_client.inc +++ b/etc/inc/xmlrpc_client.inc @@ -1493,13 +1493,15 @@ class XML_RPC_Message extends XML_RPC_Base if (!xml_parse($parser_resource, $data, sizeof($data))) { // thanks to Peter Kocks <peter.kocks@baygate.com> if (xml_get_current_line_number($parser_resource) == 1) { - $errstr = gettext("XML error at line 1, check URL"); + /* We already error on this in the GUI, no need to log it and cause a PHP error. */ + //$errstr = gettext("XML error at line 1, check URL"); } else { $errstr = sprintf('XML error: %s at line %d', xml_error_string(xml_get_error_code($parser_resource)), xml_get_current_line_number($parser_resource)); } - error_log($errstr); + if (!empty($errstr)) + error_log($errstr); $r = new XML_RPC_Response(0, $XML_RPC_err['invalid_return'], $XML_RPC_str['invalid_return']); xml_parser_free($parser_resource); |