From 64612f207053242bb3069d2e36157943ffa762d3 Mon Sep 17 00:00:00 2001 From: Geoff Munn Date: Tue, 13 Oct 2009 00:35:58 +0000 Subject: [PATCH] BUG FIX: error messages suppressed as a temporary fix git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88752 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- integration/HTMLValue.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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; + + } /**