Permalink
Browse files

Fix: It runs on PHP 7.1.* CPU process is 100%

  • Loading branch information...
Xiphin committed Jun 1, 2017
1 parent 65d5cde commit cb4871f4464659918e0c59b914d359a8874ea62a
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 = false;
$current_li = new stdClass();
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 ($current_li === false) {
if (get_class($current_li) === "stdClass") {
$current_li = new HTMLPurifier_Node_Element('li');
$result[] = $current_li;
}

0 comments on commit cb4871f

Please sign in to comment.