From: Michael M Slusarz Date: Thu, 22 Jul 2010 17:23:36 +0000 (-0600) Subject: PHPUnit does not like the static usage of DOMDocument. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3f3c1a9dbac8bffda689b1017c5e6d4e04adbaba;p=horde.git PHPUnit does not like the static usage of DOMDocument. --- diff --git a/framework/Text_Filter/lib/Horde/Text/Filter/Html2text.php b/framework/Text_Filter/lib/Horde/Text/Filter/Html2text.php index 29c086567..ccae44d81 100644 --- a/framework/Text_Filter/lib/Horde/Text/Filter/Html2text.php +++ b/framework/Text_Filter/lib/Horde/Text/Filter/Html2text.php @@ -107,7 +107,8 @@ class Horde_Text_Filter_Html2text extends Horde_Text_Filter_Base $text = Horde_String::convertCharset($text, $this->_params['charset'], 'UTF-8'); $old_error = libxml_use_internal_errors(true); - $doc = DOMDocument::loadHTML('' . $text); + $doc = new DOMDocument(); + $doc->loadHTML('' . $text); if ($old_error) { libxml_use_internal_errors(false); }