aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-12-04 21:32:52 +0000
committermistic100 <mistic@piwigo.org>2013-12-04 21:32:52 +0000
commit989d3af76509257dec83680054824aa719871432 (patch)
tree4d76e7af689907d4b83d4823a3ca83d8a9e9b802
parente7b45d169e4e3786c6e5ec80ebccb79055fe7830 (diff)
feature 2995: disable DOM parsing warnings
git-svn-id: http://piwigo.org/svn/trunk@25787 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_mail.inc.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php
index ac12b51f5..3f92c72b9 100644
--- a/include/functions_mail.inc.php
+++ b/include/functions_mail.inc.php
@@ -907,9 +907,17 @@ function move_css_to_body($content)
{
include_once(PHPWG_ROOT_PATH.'include/emogrifier.class.php');
+ // disable DOM warnings
+ $e_state = libxml_use_internal_errors(true);
+
$e = new Emogrifier($content);
// $e->preserveStyleTag = true;
- return $e->emogrify();
+ $content = $e->emogrify();
+
+ libxml_clear_errors();
+ libxml_use_internal_errors($e_state);
+
+ return $content;
}
/**