Welcome Guest, Not a member yet? Register   Sign In
Upload class upload path error msg appears twice
#1

[eluser]tomcode[/eluser]
When uploading an image without having the correct path set I get the error message twice.

I'm working under Apache 2, PHP5

Code:
upload_data Array
(
    [error] => <p>The upload path does not appear to be valid.</p><p>The upload path does not appear to be valid.</p>

)

Edit : Both CI 1.6.1 and SVN version of today
#2

[eluser]Référencement Google[/eluser]
I confirm this problem too, looks like a real bug.
#3

[eluser]scottzirkel[/eluser]
Quick fix:

In your libraries directory, open Upload.php and change the display_errors function to this:

Code:
function display_errors($open = '<p>', $close = '</p>')
    {
        $str = '';
        foreach(array_unique($this->error_msg) as $val)
        {
            $str .= $open.$val.$close;
        }
    
        return $str;
    }
#4

[eluser]tomcode[/eluser]
@wonderdog : Looks nice.
#5

[eluser]tomcode[/eluser]
wonderdog's quick fix does it for me.
#6

[eluser]GSV Sleeper Service[/eluser]
another possible fix. in the do_upload method (line #144) you'll see

Code:
// Is the upload path valid?
        if ( ! $this->validate_upload_path())
        {
            $this->set_error('upload_no_filepath');
            return FALSE;
        }

you could just change this to
Code:
// Is the upload path valid?
if ( ! $this->validate_upload_path())
{
    return FALSE;
}

as validate_upload_path sets the error




Theme © iAndrew 2016 - Forum software by © MyBB