Skip to content

Commit

Permalink
Added default empty string to placeholder variable
Browse files Browse the repository at this point in the history
php 8.1, eeh rating module was throwing:

```Deprecated
htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated

ee/ExpressionEngine/View/_shared/filters/filter.php, line 17```

Basically, the collection filter didn't have a default specified, so it was null and htmlentities didn't love it.

Seemed better to put a default here than require it of add-ons.
  • Loading branch information
robinsowell authored and intoeetive committed Nov 1, 2022
1 parent 59c83bc commit 1127adb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/ee/ExpressionEngine/Service/Filter/Filter.php
Expand Up @@ -58,7 +58,7 @@ abstract class Filter
/**
* @var string The value to use for the custom input's placeholder="" attribute
*/
protected $placeholder;
protected $placeholder = '';

/**
* @var bool Whether or not this filter has a custom <input> element
Expand Down

0 comments on commit 1127adb

Please sign in to comment.