Permalink
Browse files

Mod: using null instead of false

  • Loading branch information...
Xiphin committed Jun 2, 2017
1 parent cb4871f commit b9bc1039da7b5f49336580bf6d08499199b7309f
Showing with 2 additions and 2 deletions.
  1. +2 −2 library/HTMLPurifier/ChildDef/List.php
@@ -50,7 +50,7 @@ public function validateChildren($children, $config, $context)
// 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 @@ public function validateChildren($children, $config, $context)
// 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;
}

0 comments on commit b9bc103

Please sign in to comment.