mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-12 18:30:06 +01:00
Set compund filter accessible for reflection to fix errors on PHP < 8.1
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user