Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pfefferle committed Jul 16, 2024
2 parents 207fd1c + 35d2f90 commit c64391b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions includes/Handler/class-mf2.php
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,14 @@ public function compare_urls( $needle, $haystack, $schemeless = true ) {
$needle = array( $needle );
}

// Flatten the haystack to ensure it only contains strings
$haystack = array_filter(
$haystack,
function ( $element ) {
return is_string( $element ) && ! is_array( $element );
}
);

// Compare both arrays.
return array_intersect( $needle, $haystack );
}
Expand Down

0 comments on commit c64391b

Please sign in to comment.