summaryrefslogtreecommitdiff
path: root/src/HTML5/Serializer
diff options
context:
space:
mode:
authorMatt Farina <[email protected]>2013-06-26 16:33:37 -0400
committerMatt Farina <[email protected]>2013-06-26 16:33:37 -0400
commit794331c4383121c00d883baa51f4e1fc110e80bc (patch)
treebd2f5f2be03ce8bbc6e5d6c228fe571b37cad85c /src/HTML5/Serializer
parenta7c74625e33b83519e3182a8553aa39763591f02 (diff)
Fixed an issue when writing fragments and trying to check for a tag name on a fragment.
Diffstat (limited to 'src/HTML5/Serializer')
-rw-r--r--src/HTML5/Serializer/OutputRules.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/HTML5/Serializer/OutputRules.php b/src/HTML5/Serializer/OutputRules.php
index edea729..a37fdd3 100644
--- a/src/HTML5/Serializer/OutputRules.php
+++ b/src/HTML5/Serializer/OutputRules.php
@@ -90,7 +90,7 @@ class OutputRules implements \HTML5\Serializer\RulesInterface {
* The text node to write.
*/
public function text($ele) {
- if (isset($ele->parentNode) && Elements::isA($ele->parentNode->tagName, Elements::TEXT_RAW)) {
+ if (isset($ele->parentNode) && isset($ele->parentNode->tagName) && Elements::isA($ele->parentNode->tagName, Elements::TEXT_RAW)) {
$this->wr($ele->data);
return;
}