{"action":"created","issue":{"url":"https://api.github.com/repos/aivis/PHP-file-upload-class/issues/9","labels_url":"https://api.github.com/repos/aivis/PHP-file-upload-class/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/aivis/PHP-file-upload-class/issues/9/comments","events_url":"https://api.github.com/repos/aivis/PHP-file-upload-class/issues/9/events","html_url":"https://github.com/aivis/PHP-file-upload-class/issues/9","id":46208421,"number":9,"title":"is_writable returning NULL / false after set_destination","user":{"login":"crona2011","id":8029979,"avatar_url":"https://avatars.githubusercontent.com/u/8029979?v=3","gravatar_id":"","url":"https://api.github.com/users/crona2011","html_url":"https://github.com/crona2011","followers_url":"https://api.github.com/users/crona2011/followers","following_url":"https://api.github.com/users/crona2011/following{/other_user}","gists_url":"https://api.github.com/users/crona2011/gists{/gist_id}","starred_url":"https://api.github.com/users/crona2011/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crona2011/subscriptions","organizations_url":"https://api.github.com/users/crona2011/orgs","repos_url":"https://api.github.com/users/crona2011/repos","events_url":"https://api.github.com/users/crona2011/events{/privacy}","received_events_url":"https://api.github.com/users/crona2011/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-10-19T15:31:06Z","updated_at":"2015-09-22T14:13:58Z","closed_at":"2015-09-22T14:13:58Z","body":"Firstly i would like to say good work, this is decent script.\r\n\r\nI was getting:\r\n`Warning: mkdir(): File exists in <dir>\\upload.php on line 573`\r\nwhen trying to use a pre-created directory, or uploading more than once to same directory after creation.\r\n\r\nI 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:\r\n\r\nln. 558\r\n```\r\n\tprotected function destination_exist() {\r\n\t\treturn is_writable($this->destination);\r\n\t}\r\n```\r\nTo this:\r\n\r\n```\r\n\tprotected function destination_exist() {\r\n\t\treturn is_writable($this->root . $this->destination);\r\n\t}\r\n```\r\n\r\nTo get it to check the directory correctly"},"comment":{"url":"https://api.github.com/repos/aivis/PHP-file-upload-class/issues/comments/142300855","html_url":"https://github.com/aivis/PHP-file-upload-class/issues/9#issuecomment-142300855","issue_url":"https://api.github.com/repos/aivis/PHP-file-upload-class/issues/9","id":142300855,"user":{"login":"aivis","id":935577,"avatar_url":"https://avatars.githubusercontent.com/u/935577?v=3","gravatar_id":"","url":"https://api.github.com/users/aivis","html_url":"https://github.com/aivis","followers_url":"https://api.github.com/users/aivis/followers","following_url":"https://api.github.com/users/aivis/following{/other_user}","gists_url":"https://api.github.com/users/aivis/gists{/gist_id}","starred_url":"https://api.github.com/users/aivis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aivis/subscriptions","organizations_url":"https://api.github.com/users/aivis/orgs","repos_url":"https://api.github.com/users/aivis/repos","events_url":"https://api.github.com/users/aivis/events{/privacy}","received_events_url":"https://api.github.com/users/aivis/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T14:13:58Z","updated_at":"2015-09-22T14:13:58Z","body":"https://github.com/aivis/PHP-file-upload-class/commit/36b8b723b5772e82c1900ceb8640ace7dad8d1b6"}}