summaryrefslogtreecommitdiff
path: root/src/Readability.php
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2018-11-06 23:39:49 +0000
committerAndres Rey <[email protected]>2018-11-06 23:39:49 +0000
commitda2e712e3f7e4053c2b7202a701e6472c8409a28 (patch)
tree208fda15ffecc2c712c374a85aaa66f3f9f52a53 /src/Readability.php
parent2fbf4b1b485477af1c80a158f2c4921f37b77822 (diff)
Set default value for $carry in array_reduce functions
Diffstat (limited to 'src/Readability.php')
-rw-r--r--src/Readability.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Readability.php b/src/Readability.php
index ab35ca4..2fe6ba5 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -1281,7 +1281,7 @@ class Readability
$cell = $row->firstChild;
$cell = NodeUtility::setNodeTag($cell, (array_reduce(iterator_to_array($cell->childNodes), function ($carry, $node) {
return $node->isPhrasingContent() && $carry;
- })) ? 'p' : 'div');
+ }, true)) ? 'p' : 'div');
$table->parentNode->replaceChild($cell, $table);
}
}