From: edward Date: Mon, 26 Mar 2018 08:39:23 +0000 (+0800) Subject: Mailer.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=586f07004430f6e634ad3ee51878cb31c513ed24 Mailer.php --- diff --git a/Mailer.php b/Mailer.php index 0fe1eef8..22a0dfd4 100644 --- a/Mailer.php +++ b/Mailer.php @@ -459,13 +459,12 @@ class Pman_Core_Mailer { @$dom->loadHTML('' .$html); - $html = $dom->getElementsByTagName('html'); $head = $dom->getElementsByTagName('head'); $body = $dom->getElementsByTagName('head'); if(!$head->length){ $head = $dom->createElement('head'); - $html->item(0)->insertBefore($head, $body->item(0)); + $body->item(0)->parentNode->insertBefore($head, $body->item(0)); $head = $dom->getElementsByTagName('head'); }