fix PHP 8.0 TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given

This commit is contained in:
Ralf Becker 2021-10-11 12:43:20 +02:00
parent 4581ad7e2b
commit 8485a1ea04

View File

@ -279,7 +279,7 @@ class importexport_export_csv implements importexport_iface_export_record
}
// Fall through for other settings
case 'select':
if (count($c_field['values']) == 1 && isset($c_field['values']['@']))
if (!empty($c_field['values']) && count($c_field['values']) == 1 && isset($c_field['values']['@']))
{
$c_field['values'] = Api\Storage\Customfields::get_options_from_file($c_field['values']['@']);
}