- Affected version
- 2.3.13
PHP:
/**
* @param string $key
* @param bool $multiple If true, returns an array of uploads for this key
* @param bool $skipErrors If true, uploads with errors will not be returned
*
* @return Upload|Upload[]
*/
public function getFile($key, $multiple = false, $skipErrors = true)
{
if (!$this->fileExists($key))
{
return ($multiple ? [] : null);
}
[...]
$output = [];
[...]
if ($multiple)
{
return $output;
}
else
{
return reset($output);
}
}
Given this code the method may also return
null or false