From b9bc1039da7b5f49336580bf6d08499199b7309f Mon Sep 17 00:00:00 2001 From: Xiphin Date: Fri, 2 Jun 2017 08:50:38 +0800 Subject: [PATCH] Mod: using null instead of false --- library/HTMLPurifier/ChildDef/List.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/HTMLPurifier/ChildDef/List.php b/library/HTMLPurifier/ChildDef/List.php index f6c22788..4fc70e0e 100644 --- a/library/HTMLPurifier/ChildDef/List.php +++ b/library/HTMLPurifier/ChildDef/List.php @@ -50,7 +50,7 @@ class HTMLPurifier_ChildDef_List extends HTMLPurifier_ChildDef // a little sanity check to make sure it's not ALL whitespace $all_whitespace = true; - $current_li = new stdClass(); + $current_li = null; foreach ($children as $node) { if (!empty($node->is_whitespace)) { @@ -71,7 +71,7 @@ class HTMLPurifier_ChildDef_List extends HTMLPurifier_ChildDef // to handle non-list elements; non-list elements should // not be appended to an existing li; only li created // for non-list. This distinction is not currently made. - if (get_class($current_li) === "stdClass") { + if ($current_li === null) { $current_li = new HTMLPurifier_Node_Element('li'); $result[] = $current_li; } -- 2.11.4.GIT