Details
Description
The Zend_Form_Element_File getFileName($value = null) function should have an additional optional parameter which would be $path = null just like in the Zend_File_Transfer_Abstract class where the getFileName accepts a boolean (on the second parameter) which will truncate the full path if true is passed.
If value is empty, the adapter's getFileName is called and therefore Zend_Form_Element_File getFileName function should be behaving the same as the one in the abstract class.
The suggested correction would then be:
public function getFileName($value = null, $path = null)
{
if (empty($value)) {
$value = $this->getName();
}
return $this->getTransferAdapter()->getFileName($value, $path);
}
And why should this be a bug ?
What you describes looks for me like a feature request and not like a bug.