diff --git a/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayColumnReturnTypeProvider.php b/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayColumnReturnTypeProvider.php index 36e15cb9b..a85daa7b2 100644 --- a/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayColumnReturnTypeProvider.php +++ b/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayColumnReturnTypeProvider.php @@ -114,6 +114,8 @@ class ArrayColumnReturnTypeProvider implements FunctionReturnTypeProviderInterfa } //array_column skips undefined elements so resulting type is necessarily defined $result_element_type->possibly_undefined = false; + } elseif ($value_column_name === null) { + $result_element_type = new Union([$row_shape]); } else { $result_element_type = Type::getMixed(); }