Yes, this is expected behaviour.
Because otherwise you would never be able to call getValue() before you
received the file in eighter of both directions.
To check if a file was uploaded simply use isValid()...
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com
----- Original Message -----
From: "gerardroche" <[EMAIL PROTECTED]>
To: <fw-general@lists.zend.com>
Sent: Tuesday, September 09, 2008 2:15 PM
Subject: [fw-general] Zend_Form_Element_File & getValue()
If a file is submitted via Zend_Form_Element_File it returns the files
location.
i.e. $location = $form->foo->getValue();
But if no file is submitted it returns the the destination directory, i.e.
by default, the system temp directory.
Is this expected behavior?
Would it not be better for it to return null, if no file is uploaded?
--
View this message in context:
http://www.nabble.com/Zend_Form_Element_File---getValue%28%29-tp19391067p19391067.html
Sent from the Zend Framework mailing list archive at Nabble.com.