array(4) { [0]=> string(19) "application/msexcel" [1]=> string(10) "text/plain" [2]=> string(25) "application/octect-stream" [3]=> string(8) "text/csv" } string(24) "application/octet-stream" string(8) "wtf d00d" getMimeType((string) $value['tmp_name'], (string) $value['type']); 143 144 // check mime type 145 if ($this->hasOption('mime_types')) 146 { 147 $mimeTypes = is_array($this->getOption('mime_types')) ? $this->getOption('mime_types') : $this->getMimeTypesFromCategory($this->getOption('mime_types')); 148 var_dump($mimeTypes); 149 var_dump($mimeType); 150 if (!in_array($mimeType, $mimeTypes)) 151 { 152 var_dump('wtf d00d'); 153 die(); 154 throw new sfValidatorError($this, 'mime_types', array('mime_types' => $mimeTypes, 'mime_type' => $mimeType)); 155 } 156 } ?>