mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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
This commit is contained in:
parent
b59507414f
commit
64612f2070
@ -45,10 +45,17 @@ class SS_HTMLValue extends ViewableData {
|
||||
* @return bool
|
||||
*/
|
||||
public function setContent($content) {
|
||||
return $this->getDocument()->loadHTML(
|
||||
'<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head>' .
|
||||
"<body>$content</body></html>"
|
||||
);
|
||||
//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(
|
||||
'<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head>' .
|
||||
"<body>$content</body></html>");
|
||||
error_reporting($old_level);
|
||||
return $value;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user