Skip to content

Commit

Permalink
Fix: It runs on PHP 7.1.* CPU process is 100%
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiphin committed Jun 1, 2017
1 parent 65d5cde commit cb4871f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/HTMLPurifier/ChildDef/List.php
Expand Up @@ -50,7 +50,7 @@ public function validateChildren($children, $config, $context)
// a little sanity check to make sure it's not ALL whitespace // a little sanity check to make sure it's not ALL whitespace
$all_whitespace = true; $all_whitespace = true;


$current_li = false; $current_li = new stdClass();


foreach ($children as $node) { foreach ($children as $node) {
if (!empty($node->is_whitespace)) { if (!empty($node->is_whitespace)) {
Expand All @@ -71,7 +71,7 @@ public function validateChildren($children, $config, $context)
// to handle non-list elements; non-list elements should // to handle non-list elements; non-list elements should
// not be appended to an existing li; only li created // not be appended to an existing li; only li created
// for non-list. This distinction is not currently made. // 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'); $current_li = new HTMLPurifier_Node_Element('li');
$result[] = $current_li; $result[] = $current_li;
} }
Expand Down

0 comments on commit cb4871f

Please sign in to comment.