diff --git a/integration/HTMLValue.php b/integration/HTMLValue.php index bc26c66d4..ba9580fc3 100755 --- a/integration/HTMLValue.php +++ b/integration/HTMLValue.php @@ -45,10 +45,17 @@ class SS_HTMLValue extends ViewableData { * @return bool */ public function setContent($content) { - return $this->getDocument()->loadHTML( - '' . - "$content" - ); + //This is a patch to prevent invalid HTML returning warnings. + //Error messages are disabled, and then re-enabled + $old_level=error_reporting(); + error_reporting(0); + $value=$this->getDocument()->loadHTML( + '' . + "$content"); + error_reporting($old_level); + return $value; + + } /**