summaryrefslogtreecommitdiff
path: root/src/Nodes
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2018-11-06 18:46:36 +0000
committerAndres Rey <[email protected]>2018-11-06 18:46:36 +0000
commit2fbf4b1b485477af1c80a158f2c4921f37b77822 (patch)
treeb8cfb47f337e304889c7f4d756705833ca256207 /src/Nodes
parent743dd1dba7a863ffbddffea9d8171cc0519871c9 (diff)
Fix wrong reduction of array (must return true if ALL the calls returned true)
Diffstat (limited to 'src/Nodes')
-rw-r--r--src/Nodes/NodeTrait.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index 08aa794..da09f26 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -476,7 +476,7 @@ trait NodeTrait
(!is_null($this->childNodes) &&
($this->nodeName === 'a' || $this->nodeName === 'del' || $this->nodeName === 'ins') &&
array_reduce(iterator_to_array($this->childNodes), function ($carry, $node) {
- return $carry || $node->isPhrasingContent();
+ return $node->isPhrasingContent() && $carry;
})
);
}