Non-static method upload::isReadable()

See all posts See thread Reply

Re: Non-static method upload::isReadable() Problem new!
by colin, 17 years, 6 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