Fix minore

This commit is contained in:
MatteoPistorello 2022-04-06 11:07:18 +02:00
parent cce5cac9d4
commit 96c780e731
1 changed files with 8 additions and 6 deletions

View File

@ -172,14 +172,16 @@ TXT;
*
* @return array
*/
public static function forceArray($array)
public static function forceArray($value)
{
if (!array_key_exists(0, $array)) {
$result = $array;
$array = [];
$array[0] = $result;
if (is_array($value)) {
if (!array_key_exists(0, $value)) {
$result = $value;
$value = [];
$value[0] = $result;
}
}
return $array;
return $value;
}
}