fix should check the negative
This commit is contained in:
parent
2a706411cf
commit
0e9451e100
@ -206,10 +206,10 @@ class FileUpload
|
||||
if (!key_exists("upload_dir", $this->options)) {
|
||||
setEventMessage('If $fk_element = null or $element = null you must specify upload_dir on $options', 'errors');
|
||||
throw new Exception('If $fk_element = null or $element = null you must specify upload_dir on $options');
|
||||
} elseif (is_dir($this->options['upload_dir'])) {
|
||||
} elseif (!is_dir($this->options['upload_dir'])) {
|
||||
setEventMessage('The directory '.$this->options['upload_dir'].' doesn\'t exists', 'errors');
|
||||
throw new Exception('The directory '.$this->options['upload_dir'].' doesn\'t exists');
|
||||
} elseif (is_writable($this->options['upload_dir'])) {
|
||||
} elseif (!is_writable($this->options['upload_dir'])) {
|
||||
setEventMessage('The directory '.$this->options['upload_dir'].' is not writable', 'errors');
|
||||
throw new Exception('The directory '.$this->options['upload_dir'].' is not writable');
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user