Details
Description
I got the following warning when working with a Zend_Form_Element_File in a trivial form:
Notice: Undefined index: CONTENT_LENGTH in /usr/local/php/share/Zend/File/Transfer/Adapter/Http.php on line 124
The line 124 we have:
// Workaround for a PHP error returning empty $_FILES when form data exceeds php settings if (empty($this->_files) && ($_SERVER['CONTENT_LENGTH'] > 0)) {
Maybe a simple array_key_exists() or isset() before the if might solve this notice.
When there is no CONTENT_LENGTH available then you have a web-server problem.
It should always be available as long as $_POST is here and you received data from a form.
And when POST does not exist you can not have a active upload.