From da2e712e3f7e4053c2b7202a701e6472c8409a28 Mon Sep 17 00:00:00 2001 From: Andres Rey Date: Tue, 6 Nov 2018 23:39:49 +0000 Subject: Set default value for $carry in array_reduce functions --- src/Readability.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Readability.php') 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); } } -- cgit v1.2.3