You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 14, 2021. It is now read-only.
// No luck after removing flags, just return the longest text we found during the different loopsusort($this->attempts, function ($a, $b) {
return$a['textLength'] < $b['textLength']; // L198
});
php 7.4 is complaining:
usort(): Returning bool from comparison functionis deprecated, return an integer less than, equal to, or greater than zero
https://github.com/andreskrey/readability.php/blob/master/src/Readability.php#L198
php 7.4 is complaining:
Suggested fix:
(NB: replacing
<with-, and swapped operands)Testing:
Output:
$ php -e x.php Array ( [0] => Array ( [textLength] => 7 [b] => 2 ) [1] => Array ( [textLength] => 5 [b] => 1 ) [2] => Array ( [textLength] => 3 [b] => 3 ) [3] => Array ( [textLength] => 1 [b] => 4 ) ) Array ( [0] => Array ( [textLength] => 7 [b] => 2 ) [1] => Array ( [textLength] => 5 [b] => 1 ) [2] => Array ( [textLength] => 3 [b] => 3 ) [3] => Array ( [textLength] => 1 [b] => 4 ) )