Zend Framework

Could not remove first file validator

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: 1.7.7
  • Component/s: Zend_File_Transfer
  • Labels:
    None

Description

if (!$index = array_search($key, $this->_files[$file]['validators'])){
==> if ($index ===0) the test is skipped and the validator is not removed

=> better use :
if ( ($index = array_search($key, $this->_files[$file]['validators'])) === false ) {

Activity

Hide
Thomas Weidner added a comment -

That's correct behaviour.

It is not allowed to delete the Upload validator as it's essential for file uploads. And the upload validator is always attached as first validator for file elements.

Show
Thomas Weidner added a comment - That's correct behaviour. It is not allowed to delete the Upload validator as it's essential for file uploads. And the upload validator is always attached as first validator for file elements.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: