Skip to content

Commit

Permalink
Resolved an issue where the author filter could have a missing label.
Browse files Browse the repository at this point in the history
If no screen name was set, you'd end up with author filters on edit entries and files where nothing showed in cases where screen name was missing.

You could also throw a php error in php 8.1+

```htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated
ee/ExpressionEngine/Service/Filter/Filter.php, line 227```
  • Loading branch information
robinsowell committed Feb 13, 2023
1 parent 7277e39 commit f696c3a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -385,7 +385,7 @@ private function createAuthorFilter($channel_id = null)

$author_filter_options = [];
foreach ($authors_query->result() as $row) {
$author_filter_options[$row->author_id] = $row->screen_name;
$author_filter_options[$row->author_id] = (!empty($row->screen_name)) ? $row->screen_name : $row->username;
}

// Put the current user at the top of the author list
Expand Down

0 comments on commit f696c3a

Please sign in to comment.