Changeset 200


Ignore:
Timestamp:
Jul 6, 2006 6:19:03 AM (18 years ago)
Author:
scdev
Message:

Changed element validated by fileUploaded to name? because it will not be set if there is a file error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Validator.inc.php

    r188 r200  
    295295    function fileUploaded($form_name)
    296296    {
    297         if (!isset($_FILES[$form_name]['tmp_name']) || empty($_FILES[$form_name]['tmp_name'])) {
     297        if (!isset($_FILES[$form_name]['name']) || empty($_FILES[$form_name]['name'])) {
    298298            return false;
    299299        }
    300300       
    301         if (is_array($_FILES[$form_name]['tmp_name'])) {
    302             foreach($_FILES[$form_name]['tmp_name'] as $f) {
     301        if (is_array($_FILES[$form_name]['name'])) {
     302            foreach($_FILES[$form_name]['name'] as $f) {
    303303                if ('' == $f) {
    304304                    return false;
     
    306306            }
    307307        } else {
    308             if ('' == $_FILES[$form_name]['tmp_name']) {
     308            if ('' == $_FILES[$form_name]['name']) {
    309309                return false;
    310310            }
Note: See TracChangeset for help on using the changeset viewer.