apply usort workaround for readability-php because its authors were unable to do so for 3 months (https://github.com/andreskrey/readability.php/issues/99)

This commit is contained in:
Andrew Dolgov 2021-05-28 14:42:14 +03:00
parent 8e1281b41e
commit 92c78beb90
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ class Readability
// No luck after removing flags, just return the longest text we found during the different loops
usort($this->attempts, function ($a, $b) {
return $a['textLength'] < $b['textLength'];
return $b['textLength'] - $a['textLength'];
});
// But first check if we actually have something