Skip to content

Commit

Permalink
Fix PHP8.1 deprecated function parameter is null
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisjacquet committed May 24, 2022
1 parent 5867dae commit d89e4e5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion functions/ListOutput.fnc.php
Expand Up @@ -808,6 +808,12 @@ function _listSearch( $result, $LO_search )

foreach ( (array) $value as $val )
{
if ( empty( $val )
&& $val !== '0' )
{
continue;
}

// FJ better list searching by isolating the values.
$val = mb_strtolower( strip_tags( preg_replace( '/<script\b[^>]*>(.*?)<\/script>/is', "", $val ) ) );

Expand All @@ -821,7 +827,7 @@ function _listSearch( $result, $LO_search )

foreach ( $terms as $term => $one )
{
if ( mb_strpos( $val, $term ) !== FALSE )
if ( mb_strpos( $val, $term ) !== false )
{
// +3 for each Term found.
$values[$key] += 3;
Expand Down

0 comments on commit d89e4e5

Please sign in to comment.