mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-26 11:48:49 +02:00
Set compund filter accessible for reflection to fix errors on PHP < 8.1
This commit is contained in:
parent
0d0a04c36f
commit
ffa804404c
1 changed files with 3 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue