Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_writable returning NULL / false after set_destination #9

Closed
crona2011 opened this issue Oct 19, 2014 · 4 comments
Closed

is_writable returning NULL / false after set_destination #9

crona2011 opened this issue Oct 19, 2014 · 4 comments

Comments

@crona2011
Copy link

Firstly i would like to say good work, this is decent script.

I was getting:
Warning: mkdir(): File exists in <dir>\upload.php on line 573
when trying to use a pre-created directory, or uploading more than once to same directory after creation.

I searched the class and found set_destination() and sub-sequentially is_writable() was being called on a relative path and returning NULL, I had to change:

ln. 558

    protected function destination_exist() {
        return is_writable($this->destination);
    }

To this:

    protected function destination_exist() {
        return is_writable($this->root . $this->destination);
    }

To get it to check the directory correctly

@sagarguhe
Copy link

Thanks @crona2011 it also solved my problem...

@pbarney
Copy link

pbarney commented Mar 26, 2015

Agreed. This should be committed.

@simmbiote
Copy link

I was just going to suggest this...

@aivis
Copy link
Owner

aivis commented Sep 22, 2015

36b8b72

@aivis aivis closed this as completed Sep 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants