mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:44 +01:00
fix syntax error under PHP 7.3
7.3 is still the minimum requirement for 21.1
This commit is contained in:
parent
26595b4cba
commit
c688315141
@ -569,7 +569,10 @@ class Widget
|
||||
$types = $paramType instanceof \ReflectionUnionType
|
||||
? $paramType->getTypes()
|
||||
: [$paramType];
|
||||
if(in_array('array', array_map(fn(\ReflectionNamedType $t) => $t->getName(), $types)) && !is_array($params[$index]))
|
||||
if(in_array('array', array_map(static function(\ReflectionNamedType $t)
|
||||
{
|
||||
return $t->getName();
|
||||
}, $types)) && !is_array($params[$index]))
|
||||
{
|
||||
error_log("$method_name expects an array for {$param->getPosition()}: {$param->getName()}");
|
||||
$params[$index] = (array)$params[$index];
|
||||
|
Loading…
Reference in New Issue
Block a user