diff options
author | Andres Rey <[email protected]> | 2018-11-06 23:39:49 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2018-11-06 23:39:49 +0000 |
commit | da2e712e3f7e4053c2b7202a701e6472c8409a28 (patch) | |
tree | 208fda15ffecc2c712c374a85aaa66f3f9f52a53 /src/Readability.php | |
parent | 2fbf4b1b485477af1c80a158f2c4921f37b77822 (diff) |
Set default value for $carry in array_reduce functions
Diffstat (limited to 'src/Readability.php')
-rw-r--r-- | src/Readability.php | 2 |
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); } } |