*/
public function load(&$xmltext)
{
- $noderoot = $this->_parseXml($xmltext);
- if (is_a($noderoot, 'PEAR_Error') || empty($noderoot)) {
+ try {
+ $noderoot = $this->_parseXml($xmltext);
+ } catch (Horde_Exception $e) {
/**
* If the first call does not return successfully this might mean we
* got an attachment with broken encoding. There are some Kolab
}
$noderoot = $this->_parseXml($xmltext);
}
-
- if (is_a($noderoot, 'PEAR_Error')) {
- throw new Horde_Exception($noderoot);
- }
if (empty($noderoot)) {
return false;
}