mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-09 01:24:07 +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
|
$types = $paramType instanceof \ReflectionUnionType
|
||||||
? $paramType->getTypes()
|
? $paramType->getTypes()
|
||||||
: [$paramType];
|
: [$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()}");
|
error_log("$method_name expects an array for {$param->getPosition()}: {$param->getName()}");
|
||||||
$params[$index] = (array)$params[$index];
|
$params[$index] = (array)$params[$index];
|
||||||
|
Loading…
Reference in New Issue
Block a user