Reply to Re: Non-static method upload::isReadable() Problem

Re: Non-static method upload::isReadable() Problem new!
by colin, 15 years, 2 months ago
Hi Steve,

It is a bug, thank you for reporting it. You must have PHP5. I will fix it in the next release. Read More information about the problem here

In the meantime, if you use PHP5, you can do the following:
Replace lines 1818-1825
if ($this->processed && !isReadable($this->file_src_pathname)) {
    $this->processed = false;
    if (is_readable($this->file_src_pathname)) {
        $this->error = _("Source file is not readable. open_basedir restriction in place?");
    } else {
        $this->error = _("Source file is not readable. Can't carry on a process");
    }
}
with
if ($this->processed && !($f = @fopen($this->file_src_pathname, 'r'))) {
    $this->processed = false;
    if (is_readable($this->file_src_pathname)) {
        $this->error = _("Source file is not readable. open_basedir restriction in place?");
    } else {
        $this->error = _("Source file is not readable. Can't carry on a process");
    }
} else {
    fclose($f);
}

I can't test it right now, but I think it should work. Please let me know.Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important