mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 10:53:39 +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
0435f3a4a5
commit
67412124a4
@ -568,7 +568,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