Set compund filter accessible for reflection to fix errors on PHP < 8.1

This commit is contained in:
Jan Böhmer 2022-09-11 19:18:20 +02:00
parent 0d0a04c36f
commit ffa804404c

View file

@ -19,6 +19,9 @@ trait CompoundFilterTrait
$reflection = new \ReflectionClass($this);
foreach ($reflection->getProperties() as $property) {
//Set property to accessible (otherwise we run into problems on PHP < 8.1)
$property->setAccessible(true);
$value = $property->getValue($this);
//We only want filters (objects implementing FilterInterface)
if($value instanceof FilterInterface) {